diff --git a/[core]/es_extended/client/modules/death.lua b/[core]/es_extended/client/modules/death.lua index ba3fb846d..346c3ce42 100644 --- a/[core]/es_extended/client/modules/death.lua +++ b/[core]/es_extended/client/modules/death.lua @@ -62,6 +62,8 @@ end AddEventHandler("esx:onPlayerSpawn", function() Citizen.CreateThreadNow(function() + while not ESX.PlayerLoaded do Wait(0) end + while ESX.PlayerLoaded and not ESX.PlayerData.dead do if DoesEntityExist(ESX.PlayerData.ped) and (IsPedDeadOrDying(ESX.PlayerData.ped, true) or IsPedFatallyInjured(ESX.PlayerData.ped)) then Death:Died()