Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local cuffed = false -- store wether we are handcuffed or not
- RegisterNetEvent("mHandcuff")
- AddEventHandler("mHandcuff", function()
- if DoesEntityExist(GetPlayerPed(-1))
- RequestAnimDict("mp_arresting")
- while not HasAnimDictLoaded("mp_arresting")
- Citizen.Wait(0)
- end
- if cuffed then
- ClearPedSecondaryTask(GetPlayerPed(-1))
- SetEnableHandcuffs(GetPlayerPed(-1), false)
- cuffed = false
- else
- ClearPedSecondaryTask(GetPlayerPed(-1))
- TaskPlayAnim(GetPlayerPed(-1), "mp_arresting", "idle", 8.0, -8, -1, 49, 0, 0, 0, 0)
- SetEnableHandcuffs(GetPlayerPed(-1), true)
- cuffed = true
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement