This little piece of code lets the backrooms system check if the player is dead or alive correctly. Without it, your players might respawn in weird places or not revive properly. That’s it, you just made your ambulance system compatible!
ESX Compatibility#
You need to make a tiny change so the system knows when a player is dead.
Different ESX versions use slightly different names for the death variable — some call it isDead, others IsDead (notice the capital letter).
Open this file:
esx_ambulancejob/client/main.luaFind the line that says:
lua function OnPlayerDeath()(It might have code above it)
Right ABOVE that line, paste one of these two options:
If your script uses
isDead(lowercase):lua exports('isDead', function() return isDead end)If your script uses
IsDead(uppercase):lua exports('IsDead', function() return IsDead end)Save the file and restart your server.
QB Compatibility#
You don’t need to do anything.
If your server uses qb-ambulancejob, it already works automatically.



