function RemoveItemsAfterRPDeath()
TriggerServerEvent('esx_ambulancejob:setDeathStatus', 0)
ESX.TriggerServerCallback('esx_ambulancejob:removeItemsAfterRPDeath', function()
Citizen.CreateThread(function()
DoScreenFadeOut(800)
while not IsScreenFadedOut() do
Citizen.Wait(10)
end
-- ESX.TriggerServerCallback('esx_ambulancejob:removeItemsAfterRPDeath', function()
ESX.SetPlayerData('lastPosition', Config.Zones.HospitalInteriorInside1.Pos)
ESX.SetPlayerData('loadout', {})
TriggerServerEvent('esx:updateLastPosition', Config.Zones.HospitalInteriorInside1.Pos)
RespawnPed(GetPlayerPed(-1), Config.Zones.HospitalInteriorInside1.Pos)
StopScreenEffect('DeathFailOut')
DoScreenFadeIn(800)
end)
end)
end