[BUG] PlayerDeath hook is ran BEFORE the player is registered dead.

Hello, I was making a player death function in my Garry’s Mod gamemode, and I found that if you try to check if the player’s alive within the PlayerDeath function, it’s not going to work. I added a timer of 0.1 second in the code that checks if the player is alive, and it works then. Please fix this!

DoPlayerDeath is called when the player is killed…

Why would you check if the player is alive in a hook that is only run when they are killed?

I believe he was doing it for testing, to check if they where dead yet.

I think his issue is that the hook is being ran before the IsAlive flag is being set, although im not sure what he could be coding for that to be an issue.

I’m doing something, in the PlayerDeath hook that checks if all of the player’s teammates are dead, including himself.

Well if you know if he is dead then why the fuck are you checking if he’s dead? Am I missing something?

Pretty sure this is intentional.