Made event allowed to be called from server-side, so jail scripts can unrestrain

This commit is contained in:
ElPumpo
2018-07-13 12:20:55 +02:00
parent 2084a420b2
commit aebc05feeb
+6
View File
@@ -1430,6 +1430,7 @@ AddEventHandler('esx_policejob:handcuff', function()
end)
RegisterNetEvent('esx_policejob:unrestrain')
AddEventHandler('esx_policejob:unrestrain', function()
if IsHandcuffed then
local playerPed = PlayerPedId()
@@ -1440,6 +1441,11 @@ AddEventHandler('esx_policejob:unrestrain', function()
DisablePlayerFiring(playerPed, false)
SetPedCanPlayGestureAnims(playerPed, true)
FreezeEntityPosition(playerPed, false)
-- end timer
if Config.EnableHandcuffTimer and HandcuffTimer then
ESX.ClearTimeout(HandcuffTimer)
end
end
end)