# General Edits for Jobs

## General edits in jobs

{% hint style="warning" %}
Do **NOT** use this if you use `jobs_creator`!\
Use this Guide: [Jaksam Job Creator](#jaksam-job-creator)
{% endhint %}

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.

<figure><img src="https://1100044979-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6IG4qpnsvwJ4tB5edczg%2Fuploads%2F2y2nlBAP0wxSLmvEQqVk%2FScreenshot_9.png?alt=media&#x26;token=befe19d3-8eee-4271-8dfc-7cd69fa1ff4e" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1100044979-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6IG4qpnsvwJ4tB5edczg%2Fuploads%2FWhBTqGg8DKjtoYFfVBfO%2FScreenshot_10.png?alt=media&#x26;token=acfff23e-11e8-4571-aa1b-fc9e4c45de57" alt=""><figcaption></figcaption></figure>

```lua
{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'},
```

```lua
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)
```
