Skip to content

Commit

Permalink
refactor(es_extended/client/modules/death): more appropriate function…
Browse files Browse the repository at this point in the history
… name
  • Loading branch information
Kenshiin13 committed Nov 28, 2024
1 parent 3af9ce3 commit 114c337
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions [core]/es_extended/client/modules/death.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function Death:Natural()
TriggerServerEvent("esx:onPlayerDeath", data)
end

function Death:Damaged()
function Death:Died()
self.killerEntity = GetPedSourceOfDeath(ESX.PlayerData.ped)
self.deathCause = GetPedCauseOfDeath(ESX.PlayerData.ped)
self.killerId = NetworkGetPlayerIndexFromPed(self.killerEntity)
Expand All @@ -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()
Death:Died()
break
end
Citizen.Wait(250)
Expand Down

0 comments on commit 114c337

Please sign in to comment.