Skip to content

Latest commit

 

History

History
29 lines (24 loc) · 794 Bytes

README.md

File metadata and controls

29 lines (24 loc) · 794 Bytes

esx_handcuffs

Example of implementation (esx_policejob)

Client

    if data2.current.value == 'handcuff' then
      TriggerServerEvent('esx_policejob:handcuff', GetPlayerServerId(player))
    end

    if data2.current.value == 'unhandcuff' then
      TriggerServerEvent('esx_policejob:unhandcuff', GetPlayerServerId(player))
    end

Server

   RegisterServerEvent('esx_policejob:handcuff')
   AddEventHandler('esx_policejob:handcuff', function(source)
     TriggerClientEvent('esx_handcuffs:cuff', source)
   end)

   RegisterServerEvent('esx_policejob:unhandcuff')
   AddEventHandler('esx_policejob:unhandcuff', function(source)
    TriggerClientEvent('esx_handcuffs:uncuff', source)
   end)

Based on: