Garry's Mod Wiki

GetConVarNumber

  number GetConVarNumber( 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.Number

Gets the numeric 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 number
The ConVar's value.