Remember to disable esx_ambulancejob and remove all /revive command registered on your server.
What should I change in the config?
this is a very subjective question, in the config you will find many configurations, such as that of the phone you are using, the respawn time and much more.
Where are the trigger to revive a player?
Client side example
-- to set full player healt
TriggerClientEvent("fnx-death_system:setHeal", true)
-- to set a specific healt value
TriggerClientEvent("fnx-death_system:setHeal", 50)
Server side example
When I die and I am revived, the menus no longer open.
being our custom death system, you may encounter this problem with the resource. You need to change the checks that the script does when you open a menu, usually it checks if your player is dead or alive with the basic ESX system, to solve this issue you need to replace the control of the death state of your player.
I use ox_inventory, how can i adapt the death to it?
it is very simple, you will first have to deactivate the weapon wheel and replace the controls, a video tutorial follows to facilitate you.
-- to set full player healt
TriggerClientEvent("fnx-death_system:setHeal", source, true)
-- to set a specific healt value
TriggerClientEvent("fnx-death_system:setHeal", source, 50)
RegisterNetEvent("fnx-death_system:updatedeath")
AddEventHandler("fnx-death_system:updatedeath", function(bool)
isDead = bool
end)
if isDead then
print('player alive')
else
print('Player death')
end
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
BlockWeaponWheelThisFrame()
DisableControlAction(0, 37, true)
DisableControlAction(0, 199, true)
end
end)