Garry's Mod Wiki


  GameDetails( string servername, string serverurl, string mapname, number maxplayers, string steamid, string gamemode )


Callback function for when the client has joined a server. This function shows the server's loading URL by default.


1 string servername
Server's name.
2 string serverurl
Server's loading screen URL, or "" if the URL is not set.
3 string mapname
Server's current map's name.
4 number maxplayers
Max player count of server.
5 string steamid
The local player's Player:SteamID64.
6 string gamemode
Server's current gamemode's folder name.


Prints GameDetails of the server you join to console, and preserves default behavior.

local OldGameDetails = GameDetails function GameDetails( servername, serverurl, mapname, maxplayers, steamid, gamemode ) print( 1, servername ) print( 2, serverurl ) print( 3, mapname ) print( 4, maxplayers ) print( 5, steamid ) print( 6, gamemode ) OldGameDetails( servername, serverurl, mapname, maxplayers, steamid, gamemode ) end
1 ZerfTestServer 2 3 gm_construct 4 8 5 76561198052589582 6 sandbox