I have tried a dozen times to get this sequence to work but it just never does. I have pretty much copied code directly from native scripts but it still doesn’t want to work.
Citizen.CreateThread(function() local seq = 0 OpenSequenceTask(seq) TaskJump(0, 1) CloseSequenceTask(seq) TaskPerformSequence(GetPlayerPed(-1), seq) ClearSequenceTask(seq) end)
Note: 0 is suppose to replace peds if you are creating a sequence but it throws an error when I do set it to 0.
[ 20016562] fx::TestScriptHost::InvokeNative: execution failed: Error executing native 0x0ae4086104e067b1 at address 0x140a2d96e. [ 20016562] Initial SpawnError resuming coroutine: Execution of native 0ae4086104e067b1 in script host failed. [ 20016562] stack traceback: [ 20016562] [C]: in upvalue '_in' [ 20016562] citizen:/scripting/lua/natives_21e43a33.lua:1747: in function 'TaskJump' [ 20016562] client/cl_arrest.lua:6: in function <client/cl_arrest.lua:2>
also OpenSequenceTask() is suppose to take an integer argument but in natives.lua it doesn’t say it does. Same with ClearSequenceTask()
Native script: https://paste.ofcode.org/VwtjMUZ7nw4SKf8LQJVqqW
Some other script: http://gtaforums.com/topic/819828-task-sequence/