Hi so im making an arrest script that using this code:
RegisterNetEvent("cuff")
AddEventHandler('cuff', function(color, message)
-- code for cuffing goes here
--
end)
but i have this animation i wanna use for the script: a_arrest_on_floor (or something to that effect).
what is the name of the code used to check if an animation is being used? Also how would i use it?
if anyone can tell me it would be really appreciated
so kaner like this?
RegisterNetEvent("cuff")
AddEventHandler('cuff', function(color, message)
TaskPlayAnim("a_arrest_on_floor)
end)
sorry kaner didnt realize was being a smart ass
There’s a " missing at the end of the animation name
That won’t make it work tho
local Ped = GetPlayerPed(-1)
TaskPlayAnim(Ped, 'mp_arresting', 'a_arrest_on_floor', 1, -1, true, 0)
Will play the animination as long as it is called. You can loop the animation as well http://gtaxscripting.blogspot.com/2016/06/tut-gta-v-playing-and-handling.html
Thanks for all the help Apocalyptikz, I will be sure to include you in the credits for those who have provided assistance for helping to make this script.