mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 09:18:53 +00:00
Fix (es_extended): player death event
when player drop from falling and die function not active
This commit is contained in:
@@ -4,7 +4,7 @@ AddEventHandler('gameEventTriggered', function(event, data)
|
||||
if not IsPedAPlayer(victim) then return end
|
||||
local player = PlayerId()
|
||||
local playerPed = PlayerPedId()
|
||||
if victimDied and NetworkGetPlayerIndexFromPed(victim) == player and IsPedDeadOrDying(victim, true) then
|
||||
if victimDied and NetworkGetPlayerIndexFromPed(victim) == player and (IsPedDeadOrDying(victim, true) or IsPedFatallyInjured(victim)) then
|
||||
local killerEntity, deathCause = GetPedSourceOfDeath(playerPed), GetPedCauseOfDeath(playerPed)
|
||||
local killerClientId = NetworkGetPlayerIndexFromPed(killerEntity)
|
||||
if killerEntity ~= playerPed and killerClientId and NetworkIsPlayerActive(killerClientId) then
|
||||
|
||||
Reference in New Issue
Block a user