Garry's Mod Wiki

Garry's Mod Wiki


Called when a player's info has changed over the network.
When a Client joins the Server, this gameevent is called for each player on the server for the client.
So if 32 Players are on the Server, this gameevent is called 32 times on the Client.


number index
The EntIndex of the Player minus one.
number bot
1 or 0 if it is a bot or not.
number userid
The UserID of the Player.
string name
The Name of the Player.
string networkid
The SteamID of the Player.



This is a basic template with the purpose of including all arguments / table variables to make it easily known which values can be accessed.

gameevent.Listen( "player_info" ) hook.Add( "player_info", "player_info_example", function( data ) local name = // Same as Player:Nick() local steamid = data.networkid // Same as Player:SteamID() local id = data.userid // Same as Player:UserID() local bot = // Same as Player:IsBot() local index = data.index // Same as Entity:EntIndex() minus one local friendsid = data.friendsid // Same as Player:AccountID() // Player has connected; this happens instantly after they join -- do something.. end )

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...