diff --git a/[core]/es_extended/client/modules/death.lua b/[core]/es_extended/client/modules/death.lua index ccd7d3806..810525f20 100644 --- a/[core]/es_extended/client/modules/death.lua +++ b/[core]/es_extended/client/modules/death.lua @@ -43,7 +43,7 @@ function Death:Natural() TriggerServerEvent("esx:onPlayerDeath", data) end -function Death:Damaged(victim) +function Death:Damaged() self.killerEntity = GetPedSourceOfDeath(ESX.PlayerData.ped) self.deathCause = GetPedCauseOfDeath(ESX.PlayerData.ped) self.killerId = NetworkGetPlayerIndexFromPed(self.killerEntity) @@ -64,7 +64,7 @@ AddEventHandler("esx:onPlayerSpawn", function() Citizen.CreateThreadNow(function() while not ESX.PlayerData.dead do if IsPedDeadOrDying(ESX.PlayerData.ped, true) or IsPedFatallyInjured(ESX.PlayerData.ped) then - Death:Damaged(ESX.PlayerData.ped) + Death:Damaged() break end Citizen.Wait(250)