Installation

DEPENDENCIES

REQUIRED DEPENDENCIES

OPTIONAL DEPENDENCIES (IF NOT ADDED, YOU'LL HAVE TO SET THEM TO FALSE IN CONFIG)

ResourceDownload

Radial Menu

Minigame

Mapping

Gabz Recommend / Whatever you want

RESOURCE INSTALLATION GUIDE

1) RESOURCE DOWNLOAD

Download your resource from FiveM's Keymaster.

2) RESOURCE POSITIONING

You need to make sure that apex_lib is always started before any of our scripts!

ensure apex_lib
ensure [apex] -- or ensure apex_lawenforcement

3) ASSET ADDING

  1. Open apex_lawenforcement > assets > inventory_images

  2. Copy files from the folder and add them into your inventory image folder

  3. Open apex_lawenforcement > assets > sounds

  4. Copy files from the folder and add into your interaction sounds

4) ITEM ADDING

['gunrack']     = {['name'] = 'gunrack',    ['label'] = 'Gunrack',      ['weight'] = 100, ['type'] = 'item', ['image'] = 'gunrack.png',     ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Very useful if you are a Law Enforcement Officer and want to rack your weapons in your vehicle.'},
['boltcutter']  = {['name'] = 'boltcutter', ['label'] = 'Bolt Cutter',  ['weight'] = 100, ['type'] = 'item', ['image'] = 'boltcutter.png',  ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Bolt cutter used to cut small pieces of metal.'},

5) JOB ADDING

['police'] = {
    label = 'Law Enforcement',
    type = "leo",
    defaultDuty = true,
    offDutyPay = false,
    grades = {
        ['0'] = {
            name = 'Cadet',
            payment = 50
        },
        ['1'] = {
            name = 'Police Offier I',
            payment = 60
        },
        ['2'] = {
            name = 'Police Offier II',
            payment = 70
        },
        ['3'] = {
            name = 'Police Offier III',
            payment = 80
        },
        ['4'] = {
            name = 'Sergeant I',
            isboss = true,
            payment = 95
        },
        ['5'] = {
            name = 'Sergeant II',
            isboss = true,
            payment = 110
        },
        ['6'] = {
            name = 'Lieutenant',
            isboss = true,
            payment = 140
        },
        ['7'] = {
            name = 'Captain',
            isboss = true,
            payment = 155
        },
    },
},

6) HANDCUFF EXPORT

There is a short line of code, that you'll have to adjust, follow the list of steps below:

  1. Find the file: qb-smallresources > client > handsup.lua

  2. Find the line:

    if exports['qb-policejob']:IsHandcuffed() then return end
  3. And delete it or make it like below:

    -- if exports['qb-policejob']:isHandcuffed() then return end
  4. If you have this export in other scripts, repeat the process.

7) OX_INVENTORY

If you are using ox_inventory and want to use the breakout minigame. You'll need to do the following:

  • Find the file: ox_inventory > modules > bridge > qb > client.lua

  • Find this code:

    RegisterNetEvent('police:client:GetCuffed', function()
    	PlayerData.cuffed = not PlayerData.cuffed
    	LocalPlayer.state:set('invBusy', PlayerData.cuffed, false)
    
    	if not PlayerData.cuffed then return end
    
    	Weapon.Disarm()
    end)
  • Remove or comment the code.

If this isn't removed or commented. They player will not be able to access their inventory, if they break out of cuffs.

8) RADIAL MENU

In your Radial Menu script, you'll have to remove a section of code to prevent having 2 menus for the policejob.

  • Find the file: qb-radialmenu > config.lua

  • Go to line 569 (This is unedited config file):

  • Find this code:

    ["police"] = {
        {
            id = 'emergencybutton',
            title = 'Emergency button',
            icon = 'bell',
            type = 'client',
            event = 'police:client:SendPoliceEmergencyAlert',
            shouldClose = true
        }, {
            id = 'checkvehstatus',
            title = 'Check Tune Status',
            icon = 'circle-info',
            type = 'client',
            event = 'qb-tunerchip:client:TuneStatus',
            shouldClose = true
        }, {
            id = 'resethouse',
            title = 'Reset house lock',
            icon = 'key',
            type = 'client',
            event = 'qb-houses:client:ResetHouse',
            shouldClose = true
        }, {
            id = 'takedriverlicense',
            title = 'Revoke Drivers License',
            icon = 'id-card',
            type = 'client',
            event = 'police:client:SeizeDriverLicense',
            shouldClose = true
        }, {
            id = 'policeinteraction',
            title = 'Police Actions',
            icon = 'list-check',
            items = {
                {
                    id = 'statuscheck',
                    title = 'Check Health Status',
                    icon = 'heart-pulse',
                    type = 'client',
                    event = 'hospital:client:CheckStatus',
                    shouldClose = true
                }, {
                    id = 'checkstatus',
                    title = 'Check status',
                    icon = 'question',
                    type = 'client',
                    event = 'police:client:CheckStatus',
                    shouldClose = true
                }, {
                    id = 'escort',
                    title = 'Escort',
                    icon = 'user-group',
                    type = 'client',
                    event = 'police:client:EscortPlayer',
                    shouldClose = true
                }, {
                    id = 'searchplayer',
                    title = 'Search',
                    icon = 'magnifying-glass',
                    type = 'client',
                    event = 'police:client:SearchPlayer',
                    shouldClose = true
                }, {
                    id = 'jailplayer',
                    title = 'Jail',
                    icon = 'user-lock',
                    type = 'client',
                    event = 'police:client:JailPlayer',
                    shouldClose = true
                }
            }
        }, {
            id = 'policeobjects',
            title = 'Objects',
            icon = 'road',
            items = {
                {
                    id = 'spawnpion',
                    title = 'Cone',
                    icon = 'triangle-exclamation',
                    type = 'client',
                    event = 'police:client:spawnCone',
                    shouldClose = false
                }, {
                    id = 'spawnhek',
                    title = 'Gate',
                    icon = 'torii-gate',
                    type = 'client',
                    event = 'police:client:spawnBarrier',
                    shouldClose = false
                }, {
                    id = 'spawnschotten',
                    title = 'Speed Limit Sign',
                    icon = 'sign-hanging',
                    type = 'client',
                    event = 'police:client:spawnRoadSign',
                    shouldClose = false
                }, {
                    id = 'spawntent',
                    title = 'Tent',
                    icon = 'campground',
                    type = 'client',
                    event = 'police:client:spawnTent',
                    shouldClose = false
                }, {
                    id = 'spawnverlichting',
                    title = 'Lighting',
                    icon = 'lightbulb',
                    type = 'client',
                    event = 'police:client:spawnLight',
                    shouldClose = false
                }, {
                    id = 'spikestrip',
                    title = 'Spike Strips',
                    icon = 'caret-up',
                    type = 'client',
                    event = 'police:client:SpawnSpikeStrip',
                    shouldClose = false
                }, {
                    id = 'deleteobject',
                    title = 'Remove object',
                    icon = 'trash',
                    type = 'client',
                    event = 'police:client:deleteObject',
                    shouldClose = false
                }
            }
        }
    },
  • Remove or comment the code.

9) QB-PRISON

To be able to use qb-prison with our Law Enforcement Script, you'll have to adjust some code, please do as follow:

  • Find the file: qb-prison > client > main.lua

  • Find the line:

    if invokingResource and invokingResource ~= 'qb-policejob' and invokingResource ~= 'qb-ambulancejob' and invokingResource ~= GetCurrentResourceName() then
  • And replace that with:

    if invokingResource and invokingResource ~= 'apex_lawenforcement' and invokingResource ~= 'qb-ambulancejob' and invokingResource ~= GetCurrentResourceName() then

In other words, replace: qb-policejob with apex_lawenforcement

Last updated