> For the complete documentation index, see [llms.txt](https://lcdevdocs.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lcdevdocs.gitbook.io/docs/haptic/haptic-gangs/integrations/qb-ambulancejob.md).

# 🚑 QB-AmbulanceJob

To enable the functionality of gangzones being modified by player deaths we want to edit the server side of qb-ambulancejob/server/main.lua

To make this as simple as possible I have attached our export to a pre-existing function.

Find

```lua
RegisterNetEvent('hospital:server:SetDeathStatus', function(isDead)
	local src = source
	local Player = QBCore.Functions.GetPlayer(src)
	if Player then
		Player.Functions.SetMetaData('isdead', isDead)
	end
end)
```

and replace it with

```lua
RegisterNetEvent('hospital:server:SetDeathStatus', function(isDead)
	local src = source
	local Player = QBCore.Functions.GetPlayer(src)
	if Player then
		Player.Functions.SetMetaData('isdead', isDead)
	end
	if isDead then
		exports["Haptic-Gangs"]:deadPlayer(src)
	end
end)
```

and you're done
