Ambulance Job Fix
This is to fix your ambulnacejob to show this deathscreen
To remove or disable the death screen in the ESX Ambulance Job, make adjustments to certain functions in client/main.lua The following instructions guide you through commenting out lines responsible for the visual effects and camera controls associated with the death screen
Step 1: Add esx_ambulancejob:RespawnAtHospital Event
esx_ambulancejob:RespawnAtHospital EventLocate the RemoveItemsAfterRPDeath function and insert the following line below it:
RegisterNetEvent("esx_ambulancejob:RespawnAtHospital", RemoveItemsAfterRPDeath)
Step 2: Modify esx:onPlayerSpawn Event
esx:onPlayerSpawn EventLocate the esx:onPlayerSpawn event handler. Comment out the lines related to the death screen effects.
Original Code:
AddEventHandler('esx:onPlayerSpawn', function()
isDead = false
ClearTimecycleModifier()
SetPedMotionBlur(PlayerPedId(), false)
ClearExtraTimecycleModifier()
EndDeathCam()
if firstSpawn then
firstSpawn = false
if Config.SaveDeathStatus then
while not ESX.PlayerLoaded do
Wait(1000)
end
ESX.TriggerServerCallback('esx_ambulancejob:getDeathStatus', function(shouldDie)
if shouldDie then
Wait(1000)
SetEntityHealth(PlayerPedId(), 0)
end
end)
end
end
end)Updated Code:
Step 3: Modify OnPlayerDeath Function
OnPlayerDeath FunctionFind the OnPlayerDeath function, then comment out the death screen and camera effect lines.
Original Code:
Updated Code:
Step 4: Modify StartDeathLoop Function
StartDeathLoop FunctionIn the StartDeathLoop function, comment out the lines controlling the player's movement restrictions and camera controls. And don't forget to add the Wait(0).
Original Code:
Updated Code:
Step 5: Modify esx_ambulancejob:revive Event
esx_ambulancejob:revive EventIn the esx_ambulancejob:revive event handler, comment out the lines that are related to the death screen.
Original Code:
Updated Code:
Zuletzt aktualisiert
