Skip to main content

Ambulance script setup

You only need to change one ambulance script: the one you use. Not sure which one you have? Look in your resources folder for one of the names below.

info

Each change only applies while gs-deathscreen is started. If you stop gs-deathscreen, your ambulance script's own screen comes back.

The easiest one. Open ak47_ambulancejob/configs/_config.lua and set:

ak47_ambulancejob/configs/_config.lua
Config.DisableDeathScreen = true

gs-deathscreen reads ak47's config for its bleed-out time, hospital cost and distress command, so you don't need to copy them.

Using sv_stateBagStrictMode on Qbox​

Strict mode works without changes for ak47, wasabi, ESX and QBCore. On Qbox, qbx_medical needs two small changes.

In qbx_medical/client/main.lua, inside SetDeathState, right after DeathState = deathState, add:

qbx_medical/client/main.lua
TriggerServerEvent('qbx_medical:server:syncDeathState', deathState)

In qbx_medical/server/main.lua, above AddStateBagChangeHandler(DEATH_STATE_STATE_BAG, ...), add:

qbx_medical/server/main.lua
local validDeathStates = {}
for _, state in pairs(sharedConfig.deathState) do validDeathStates[state] = true end

RegisterNetEvent('qbx_medical:server:syncDeathState', function(deathState)
local src = source
if not validDeathStates[deathState] or not exports.qbx_core:GetPlayer(src) then return end
local playerState = Player(src).state
if playerState[DEATH_STATE_STATE_BAG] ~= deathState then
playerState:set(DEATH_STATE_STATE_BAG, deathState, true)
end
end)