General Edits for Jobs
Last updated
Last updated
Do NOT use this if you use jobs_creator
!
Use this Guide: Jaksam Job Creator
To let msk_handcuffs work with f.e. esx_policejob or other job scripts, go to esx_policejob/client/main.lua
and change a few things.
{icon = "fas fa-idkyet", title = 'Handcuff', value = 'handcuff'},
{icon = "fas fa-idkyet", title = 'Hardcuff', value = 'hardcuff'},
{icon = "fas fa-idkyet", title = 'Uncuff', value = 'uncuff'},
{icon = "fas fa-idkyet", title = 'Headbag', value = 'headbag'},
{icon = "fas fa-idkyet", title = 'Tape', value = 'tape'},
{icon = "fas fa-idkyet", title = 'Ankletracker', value = 'ankletracker'},
{icon = "fas fa-idkyet", title = 'Drag/Escort', value = 'drag'},
{icon = "fas fa-idkyet", title = TranslateCap('put_in_vehicle'), value = 'put_in_vehicle'},
{icon = "fas fa-idkyet", title = TranslateCap('out_the_vehicle'), value = 'out_the_vehicle'},
ESX.OpenContext("right", elements2, function(menu2,element2)
local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
if closestPlayer ~= -1 and closestDistance <= 3.0 then
local data2 = {current = element2}
local action = data2.current.value
if action == 'identity_card' then
OpenIdentityCardMenu(closestPlayer)
elseif action == 'search' then
OpenBodySearchMenu(closestPlayer)
elseif action == 'handcuff' then
exports.msk_handcuffs:cuffPlayer('cuffs', closestPlayer)
elseif action == 'hardcuff' then
exports.msk_handcuffs:hardcuffPlayer('hardcuff', closestPlayer)
elseif action == 'uncuff' then
exports.msk_handcuffs:uncuffPlayer('cuff_keys', closestPlayer)
elseif action == 'headbag' then
exports.msk_handcuffs:headbagPlayer(closestPlayer)
elseif action == 'tape' then
exports.msk_handcuffs:tapePlayer(closestPlayer)
elseif action == 'ankletracker' then
exports.msk_handcuffs:ankleTrackerPlayer(closestPlayer)
elseif action == 'drag' then
TriggerServerEvent('msk_handcuffs:setDrag', GetPlayerServerId(closestPlayer))
elseif action == 'put_in_vehicle' then
TriggerServerEvent('msk_handcuffs:putInCar', GetPlayerServerId(closestPlayer))
elseif action == 'out_the_vehicle' then
TriggerServerEvent('msk_handcuffs:outOfCar', GetPlayerServerId(closestPlayer))
elseif action == 'fine' then
OpenFineMenu(closestPlayer)
elseif action == 'license' then
ShowPlayerLicense(closestPlayer)
elseif action == 'unpaid_bills' then
OpenUnpaidBillsMenu(closestPlayer)
end
else
ESX.ShowNotification(TranslateCap('no_players_nearby'))
end
end, function(menu)
OpenPoliceActionsMenu()
end)