Garry's Mod Wiki

GetConVarString

  string GetConVarString( string name )

Description

We advise against using this. It may be changed or removed in a future update. Store the ConVar object retrieved with GetConVar or use cvars.String.

Gets the string value ConVar with the specified name.

Returns the value of game.MaxPlayers if maxplayers is specified as the convar name, even though maxplayers is not a convar. (it is a console command) You should be using aforementioned Lua function instead.

Arguments

1 string name
Name of the ConVar to get.

Returns

1 string
The ConVar's value.