mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 17:28:53 +00:00
fix(ambulancejob): stop abuse of dying
This commit is contained in:
@@ -310,16 +310,16 @@ function RemoveItemsAfterRPDeath()
|
||||
TriggerServerEvent('esx_ambulancejob:setDeathStatus', false)
|
||||
|
||||
CreateThread(function()
|
||||
DoScreenFadeOut(800)
|
||||
|
||||
while not IsScreenFadedOut() do
|
||||
Wait(0)
|
||||
end
|
||||
|
||||
ESX.TriggerServerCallback('esx_ambulancejob:removeItemsAfterRPDeath', function()
|
||||
local RespawnCoords, ClosestHospital = GetClosestRespawnPoint()
|
||||
|
||||
ESX.SetPlayerData('loadout', {})
|
||||
DoScreenFadeOut(800)
|
||||
|
||||
while not IsScreenFadedOut() do
|
||||
Wait(0)
|
||||
end
|
||||
|
||||
RespawnPed(PlayerPedId(), RespawnCoords, ClosestHospital.heading)
|
||||
|
||||
AnimpostfxStop('DeathFailOut')
|
||||
|
||||
Reference in New Issue
Block a user