⁉️Server Setup

Quick guide on how to set up your server to be ready for our police job script.


Five Manage API Key

This is required for our script to work properly on your server!

1

Create account

Go to fivemanage.com and create an account

2

Create Token

Once you created account, go to Tokens and create token for MEDIA

3

Setup Token in Server

Go to your server.cfg file and paste this, change your_api_key to api key from panel

set FIVEMANAGE_MEDIA_API_KEY your_api_key

Target resource setup

1. ox_target

We recommend using minimum 1.16.0 version of ox_target

1

First Step

Open ox_target / client / main.lua

2

Second Step

Find in code this nearbyZones, zonesChanged = utils.getNearbyZones(endCoords)

3

Third Step

Add code under this line like on screenshot

local localState = LocalPlayer.state
if localState.draggingPlayer or localState.carryingPlayer then
    entityHit = GetPlayerPed(GetPlayerFromServerId(localState.draggingPlayer or localState.carryingPlayer))
    dist = 0
end
4

Fourth Step

Scroll down and look for if entityHit > 0 then (If you can't find it, use CTRL + F)

5

Fifth Step

Make space for our snippet, and insert code below under if entityHit > 0 then

if localState.draggingPlayer or localState.carryingPlayer then
    entityHit = GetPlayerPed(GetPlayerFromServerId(localState.draggingPlayer or localState.carryingPlayer))
    entityType = 1
    distance = 0
end

File ready to go (ox_target 1.16.0)

Modified client/main.lua file if you have issue with modifying the file [ox_target 1.16.0]


2. qb-target

1

First Step

Open qb-target / client.lua

2

Second Step

Find line while targetActive do in function EnableTarget()

3

Third Step

Add code below like on screenshot.

local localState = LocalPlayer.state
if localState.draggingPlayer or localState.carryingPlayer then
    entityType = 1
    entity = GetPlayerPed(GetPlayerFromServerId(localState.draggingPlayer or localState.carryingPlayer))
    distance = 0
end
4

First Step

Find local function CheckEntity

5

Second Step

Add following code like on screenshot.

local localState = LocalPlayer.state
if localState.draggingPlayer or localState.carryingPlayer then
    entity2 = GetPlayerPed(GetPlayerFromServerId(localState.draggingPlayer or localState.carryingPlayer))
end

File ready to go

Modified client.lua file if you have issue with modifying file [Only for original qb-target without any additional modifications and/or changes]


Voice script setup

pma-voice

If you want to use our radio animation menu follow these steps

1

First Step

Open your server.cfg file

2

Second Step

Locate setr voice_enableRadioAnim 1 and set 1 to 0


Last updated