mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 01:01:22 +00:00
fix(es_extended/client/modules/death): fix death thread on first spawn
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user