{HELP PLEASE} Cuff Command

My Cuff Command Works, however, players can still drive vehicles normally, shoot weapons, etc. I am looking for someone who could be able to modify my script so players are strictly limited to only walking.

Here Is the client side script:

– client side handcuff script

local handCuffed = false – store wether we are handcuffed or not

RegisterNetEvent(‘mHandCuff’) – register that this is a valid event

– register a function to be called when we recieve the event
AddEventHandler(‘mHandCuff’, function()
– set handCuffed equal to the oposite of its current value (true or false)
handCuffed = not handCuffed
end)

Citizen.CreateThread(function() – create a thread
while true do – loop through this code infinitely
Citizen.Wait(1) – required in an infinite loop or it will crash

if (handCuffed == true) then -- we are handcuffed
  RequestAnimDict('mp_arresting') -- tell the game to load this animation dictionary

  -- check if the animation dictionary has loaded, if not, wait
  while not HasAnimDictLoaded('mp_arresting') do
    Citizen.Wait(0)
  end

  local myPed = PlayerPedId() -- get our ped identifier
  local animation = 'idle' -- animation to play
  local flags = 49 -- only play the animation on the upper body

  -- play the animation
  TaskPlayAnim(myPed, 'mp_arresting', animation, 8.0, -8, -1, flags, 0, 0, 0, 0)
end

end
end)

1 Like

Change local flags back to 18 I think it is

use the native SetEnableHandcuffs(GetPlayerPed(-1), true) and then when they are uncuffed SetEnableHandcuffs(GetPlayerPed(-1), false)

Could you send me the fixed script? I will probably screw it up. Thanks

Is that the whole client script

Could I just send you a better cuff?

Yes. sure send me a better cuff

Because now I changed that to 18 and the player cant move

@AaronBurr Sooooo Sorry… its 16 not 18… Totally my bad lol