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
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
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)