GameDetails

From Garry's Mod
Jump to: navigation, search
 GameDetails( )

Contents

Description

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

Arguments

string servername

Server's name.

Arguments

string serverurl

Server's loading screen URL, or "" if the URL is not set.

Arguments

string mapname

Server's current map's name.

Arguments

number maxplayers

Max player count of server.

Arguments

string steamid

The local player's Player:SteamID64.

Arguments

string gamemode

Server's current gamemode's folder name.

Examples

Example

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

Output:

1	ZerfTestServer
2	
3	gm_construct
4	8
5	76561198052589582
6	sandbox
Personal tools
Navigation