⁉️Setup Server

Guide to Setup Server for Ambulance Job

Target Setup


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
1

First Step

Scroll down a little bit and find if entityHit > 0 then

2

Second Step

Add code under this line like on screenshot.

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

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
1

First Step

Find local function CheckEntity

2

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

Last updated