If the player suicides (he is the killer and the victim (ply)), then it will print a message to console. If someone else kills him, it will print a different message to console.
function GM:PlayerDeath( victim, inflictor, attacker ) if ( victim == attacker ) then PrintMessage( HUD_PRINTTALK, victim:Name() .. " committed suicide." ) else PrintMessage( HUD_PRINTTALK, victim:Name() .. " was killed by " .. attacker:Name() .. ".") end end
Player1 has committed suicide.
Else:Player1 was killed by Player2.