GM/PlayerDisconnected
From Garry's Mod
GM:PlayerDisconnected( )
Contents |
Description
Called when a player leaves the server. See the player_disconnect gameevent for a shared version of this hook.
BUG |
This is not called in single-player or listen servers for the host. Issue Tracker: #3523 |
Arguments
Player ply
the player
Examples
Example
Print a message to the chatbox upon player disconnect
function GM:PlayerDisconnected( ply ) PrintMessage( HUD_PRINTTALK, ply:Name().. " has left the server." ) end
Output:
Garry :D has left the server.