GM:PlayerDeath
Description
Called when a player is killed by Player:Kill or any other normal means.
This hook is not called if the player is killed by Player:KillSilent. See GM:PlayerSilentDeath for that.
- GM:DoPlayerDeath is called before this hook.
- GM:PostPlayerDeath is called after this hook.
See Player:LastHitGroup if you need to get the last hit hitgroup of the player.
Player:Alive will return false in this hook.
Arguments
Example
If the player suicides (they are the killer and the victim), then it will print a message to console. If someone else kills them, it will print a different message to console.
Output: -- If suicide...
Player1 has committed suicide.
-- else...
Player1 was killed by Player2.