Skip to content

Commit

Permalink
Merge pull request #1534 from Kenshiin13/fix-death-event
Browse files Browse the repository at this point in the history
fix(es_extended/client/modules/death): fix death event for multichar relog
  • Loading branch information
Kenshiin13 authored Dec 8, 2024
2 parents 9083c38 + a84c28f commit f2eedb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion [core]/es_extended/client/modules/death.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ end

AddEventHandler("esx:onPlayerSpawn", function()
Citizen.CreateThreadNow(function()
while not ESX.PlayerData.dead do
while ESX.PlayerLoaded and not ESX.PlayerData.dead do
if IsPedDeadOrDying(ESX.PlayerData.ped, true) or IsPedFatallyInjured(ESX.PlayerData.ped) then
Death:Died()
break
Expand Down

0 comments on commit f2eedb6

Please sign in to comment.