GM:PlayerDisconnected
Description
Called when a player leaves the server. See the player_disconnect gameevent for a shared version of this hook.
Player:SteamID, Player:SteamID64, and the like can return nil here.
Arguments
Example
Print a message to the chatbox upon player disconnect
hook.Add( "PlayerDisconnected", "Playerleave", function(ply)
PrintMessage( HUD_PRINTTALK, ply:Name().. " has left the server. " )
end )
Output: Player1 has left the server.