Hi all !
Can anyone help me to cancel the animation/emote when i’m trying any keys to move ( W·A·S·D or SPACE ) ?? instead of going back to menu and press clear ? I’m using vrp and i’ve tried diff. options and none of them work…this is the module i have : https://pastebin.com/PF9xxwph
This is what i’ve added :
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if IsControlPressed(1, 48) then
ClearPedTasksImmediately(GetPlayerPed(-1))
end
end
end)
Its weird bug of VRP. Some fivem functions works only as hashes. Change your code to this:
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if Citizen.InvokeNative(0xF3A21BCD95725A4A, 1, 48) then
ClearPedTasksImmediately(GetPlayerPed(-1))
end
end
end)
But clearing of ped tasks every press of WASD isnt good idea.
WARNING: NON-EXISTENT NATIVE f3a21bcd95725a4a
Error resuming coroutine: modules/emotes.lua:49: attempt to call a nil value (global ‘ClearPedTasksImmediately’)
stack traceback:
modules/emotes.lua:49: in function <modules/emotes.lua:45>