MSK Scripts
TebexGithubDiscordMusiker15
  • MSK Scripts
    • Welcome
  • Common Issues
    • Keymaster
  • Miscellaneous
    • Change Notifications
  • Scripts
    • MSK Core
      • Installation
      • Functions
        • Client
          • Ace Permission
          • Commands
          • Coords
          • Player
          • Points
          • Request
          • Scaleform
          • UI
            • Input
            • Numpad
            • Progressbar
            • TextUI
          • Vehicle
        • Shared
          • String
          • Math
          • Table
          • Timeout
          • Vector
        • Server
          • Ace Permission
          • Ban System
          • Commands
          • Player
          • Scaleform
          • UI
            • Input
            • Numpad
            • Progressbar
            • TextUI
    • MSK Banking
      • Installation
        • Paycheck Transaction
      • Config
      • Exports
        • Client
        • Server
      • Events
        • Client
        • Server
      • Server Callbacks
    • MSK EngineToggle
      • Guides
      • Exports
        • Client
      • Event Handler
        • Client
        • Server
    • MSK Fuel
      • Config
      • Exports
        • Client
    • MSK Garage
      • Config
      • Exports
        • Client
    • MSK Handcuffs
      • Guides
        • General Edits for Jobs
        • Jaksam Job Creator
        • Multichar
        • ox_inventory
      • Config
      • Admin Commands
      • Exports
        • Client
        • Server
      • Events
        • Client
        • Server
      • Event Handlers
    • MSK Radio
      • Config
      • Exports
        • Client
        • Server
      • Events
        • Server
    • MSK Simcard
      • Installation
        • Config.Database
      • Config
    • MSK VehicleKeys
      • Guides
        • Installation
        • Integrations
      • Config
      • Admin Commands
      • Exports
        • Client
        • Server
    • MSK Whitelist
      • Config
      • Exports
        • Client
        • Server
    • MSK Weaponammo
Powered by GitBook
On this page
  1. Scripts
  2. MSK Handcuffs
  3. Guides

General Edits for Jobs

Last updated 8 months ago

General edits in jobs

Do NOT use this if you use jobs_creator! Use this Guide:

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)
Jaksam Job Creator