Installation
DS-Death replaces the default death/knockout/revive loop in your ambulance job. Installation is mostly drag-and-drop, with a few small patches to esx_ambulancejob or qb-ambulancejob so the existing revive flow hands off to DS-Death.
Download
Download the script from portal.cfx.re. Make sure you're logged in with the FiveM account you used to purchase the script.
Extract
Unzip the archive and drop the resulting DS-Death folder anywhere inside your server's resources folder.
mysql-async. ESX and QBCore are both supported and auto-detected at runtime.Run the SQL
Execute the SQL file matching your framework. It adds a single ds_death column used to persist death state across disconnects.
ESX
Execute INSTALLATION_GUIDE/ESX.sql in your database — adds ds_death TINYINT(1) to the users table.
QBCore
Execute INSTALLATION_GUIDE/QBCore.sql in your database — adds ds_death TINYINT(1) to the players table.
Install the revive item
DS-Death requires an aidkit item to revive knocked players. Add it to whichever inventory you run.
ESX (default inventory)
Execute INSTALLATION_GUIDE/INSTALL_ITEM/ESX/item.sql in your database to register the item.
ESX (ox_inventory)
Open INSTALLATION_GUIDE/INSTALL_ITEM/ESX/OX_INVENTORY_ITEM.md, copy the snippet and paste it into ox_inventory/data/items.lua:
['aidkit'] = {
label = 'Aid Kit',
weight = 100,
stack = true,
consume = 0,
allowArmed = true
},QBCore
Open INSTALLATION_GUIDE/INSTALL_ITEM/QBCORE/item.md, copy the snippet and paste it into qb-core/shared/items.lua:
['aidkit'] = {['name'] = 'aidkit', ['label'] = 'Aid Kit', ['weight'] = 0, ['type'] = 'item', ['image'] = 'aidkit.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = false, ['combinable'] = nil, ['description'] = 'Useful to revive knocked people'},ItemRevive and ItemLabel in config.lua instead of installing aidkit.Patch your ambulance job
DS-Death takes over the death/revive flow, so the existing handlers in esx_ambulancejob / qb-ambulancejob need to be removed or rerouted. The literal blocks to delete and replace are bundled inside the resource:
ESX (esx_ambulancejob)
Follow INSTALLATION_GUIDE/ESX.txt — three edits in total:
- esx_ambulancejob/client/main.lua — remove (or comment out) the
esx:onPlayerSpawnhandler that resetsisDead. - esx_ambulancejob/client/main.lua — replace the
esx_ambulancejob:reviveevent handler with a one-liner that hands off to DS-Death:esx_ambulancejob/client/main.luaRegisterNetEvent('esx_ambulancejob:revive') AddEventHandler('esx_ambulancejob:revive', function() TriggerEvent('DS-Death:revive') end) - esx_ambulancejob/client/job.lua — in the
revivePlayerfunction, changeif IsPedDeadOrDying(closestPlayerPed, 1) thentoif closestPlayerPed thenso DS-Death's knocked state counts as revivable.
QBCore (qb-ambulancejob)
Follow INSTALLATION_GUIDE/QBCORE.txt — two edits:
- qb-ambulancejob/server/main.lua — remove (or comment out) the existing
QBCore.Commands.Add("revive", ...)block. DS-Death registers its own. - qb-ambulancejob/client/dead.lua — remove the
gameEventTriggeredhandler that runs the laststand / death timer. DS-Death replaces that flow.
esx_ambulancejob / qb-ambulancejob folder before editing so you can roll back if something else in your stack depends on the old behaviour.Grant admin permissions
QBCore
Add the ace permission to your server.cfg so admins can use the revive commands:
add_ace group.admin ds_death allowESX
Permissions are handled through the AuthorizedGroup array in config.lua. The default {'admin'} already covers most setups.
Start the resource
Add the script to your server.cfg:
ensure DS-DeathDS-Death in the load order.Configure
Open config.lua and tune the script to your server. The most useful knobs:
- KnockoutTime / RespawnTime — how long players stay knocked, and when respawn becomes available.
- HeadShotDeath — skip the knockout state and kill instantly on a headshot.
- RespawnPosition / RespawnSamePos / RespawnCost — where players come back, and whether respawning costs cash or bank.
- CombatLogging — either keep the player dead on rejoin (
CheckDeath) or auto-respawn them (RespawnOnJoin). - RemoveItemsAfterRPDeath — drop money, weapons, and items on RP death, with a
KeepItemswhitelist for things like documents. - Progressbar —
NATIVE,RPROGRESS, orCUSTOM(wire your own intoCustomProgress/StopCustomProgress). - EMSCall — drop your phone's call trigger inside this function so the in-world EMS call routes to your phone instead of the default notification.
- EnableLogs — turn on the Discord webhook logs and configure them in
webhooks.lua.
OnKnocked, OnDeath, OnRevive, and OnRespawn in config.lua are empty functions ready for you to plug in your own triggers/exports. CanDie lets you disable the death loop conditionally — useful for minigame zones, airsoft events, or PvP arenas.