Closed tomson701 closed 2 weeks ago
Thanks for the PR
I'm not familiar with those events.
Would that event also trigger when a death is not from a particular damage? Maybe script-caused death or something.
Also, why not CEventDeath
instead?
CEventDeath
is not being triggered when you death in my case.
It's handle dead from everything as far as i know.
Also this event is being used in ESX Legacy and works fine for me.
Searching on github for CEventNetworkEntityDamage
shows that nobody agrees on what the parameters are.
Here for me on b2944 the parameter that indicates if the player died is data[6]
, maybe that's not consistent across game versions?
Also, does this even work on RedM?
Does CEventPlayerDeath
also not work for this situation? It would be nice to be able to use something that wont be triggered a bunch by other stuff.
Its also probably better to use the specific event as the handler instead of using gameEventTriggered
This should work like this:
AddEventHandler("CEventNetworkEntityDamage", function(data)
end)
This got added a few years ago and be less spammy then gameEventTriggered
Faster and more optimized method of handling player dead