MSK Scripts
Search…
⌃K

Guides

All Events and Exports for msk_handcuffs
You need msk_core! - Download it here

Edit for Jobs

Step 1

To let msk_handcuffs work with f.e. esx_policejob or other job scripts, go to esx_policejob/client/main.lua
Look at this image to know what you have to change: https://prnt.sc/7nZDQ9BTJYCI
local elements = {
{label = _U('id_card'), value = 'identity_card'},
{label = _U('search'), value = 'search'},
{label = 'Cuff', value = 'handcuff'},
{label = 'Uncuff', value = 'uncuff'},
{label = 'Drag', value = 'drag'},
{label = 'Undrag', value = 'undrag'},
{label = _U('put_in_vehicle'), value = 'put_in_vehicle'},
{label = _U('out_the_vehicle'), value = 'out_the_vehicle'},
{label = _U('fine'), value = 'fine'},
{label = _U('unpaid_bills'), value = 'unpaid_bills'}
}
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'citizen_interaction', {
title = _U('citizen_interaction'),
align = 'top-left',
elements = elements
}, function(data2, menu2)
local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
if closestPlayer ~= -1 and closestDistance <= 3.0 then
local action = data2.current.value
if action == 'identity_card' then
OpenIdentityCardMenu(closestPlayer)
elseif action == 'search' then
OpenBodySearchMenu(closestPlayer)
elseif action == 'handcuff' then
-- TriggerServerEvent('esx_policejob:handcuff', GetPlayerServerId(closestPlayer))
TriggerEvent('msk_handcuffs:checkCuff', 'cuffs', 'cuff')
elseif action == 'uncuff' then
TriggerEvent('msk_handcuffs:checkCuff', 'cuff_keys', 'uncuff')
elseif action == 'drag' then
-- TriggerServerEvent('esx_policejob:drag', GetPlayerServerId(closestPlayer))
TriggerServerEvent('msk_handcuffs:setDrag', GetPlayerServerId(closestPlayer), true)
elseif action == 'undrag' then
TriggerServerEvent('msk_handcuffs:setDrag', GetPlayerServerId(closestPlayer), false)
elseif action == 'put_in_vehicle' then
TriggerServerEvent('esx_policejob:putInVehicle', GetPlayerServerId(closestPlayer))
elseif action == 'out_the_vehicle' then
TriggerServerEvent('esx_policejob:OutVehicle', 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(_U('no_players_nearby'))
end
end, function(data2, menu2)
menu2.close()
end)

Step 2

The next step is to search for the Event esx_policejob:putInVehicle and add the export
Look at this image for more Information: https://prnt.sc/rqEjID0QFi82
Export: local isCuffed = exports.msk_handcuffs:getIsHandcuffed()