Garry's Mod Wiki

ConVar

An object returned by CreateConVar, CreateClientConVar (which uses CreateConVar internally), and GetConVar. It represents a console variable. See this page for more information.

Methods

boolean ConVar:GetBool()
Tries to convert the current string value of a ConVar to a boolean.
string ConVar:GetDefault()
Returns the default value of the ConVar
number ConVar:GetFlags()
Returns the Enums/FCVAR flags of the ConVar
number ConVar:GetFloat()
Attempts to convert the ConVar value to a float
string ConVar:GetHelpText()
Returns the help text assigned to that convar.
number ConVar:GetInt()
Attempts to convert the ConVar value to a integer.
number ConVar:GetMax()
Returns the maximum value of the ConVar
number ConVar:GetMin()
Returns the minimum value of the ConVar
string ConVar:GetName()
Returns the name of the ConVar.
string ConVar:GetString()
Returns the current ConVar value as a string.
boolean ConVar:IsFlagSet( number flag )
Returns whether the specified flag is set on the ConVar
ConVar:Revert()
Reverts ConVar to its default value
ConVar:SetBool( boolean value )
Sets a ConVar's value to 1 or 0 based on the input boolean. This can only be ran on ConVars created from within Lua.
ConVar:SetFloat( number value )
Sets a ConVar's value to to the input number. This can only be ran on ConVars created from within Lua.
ConVar:SetInt( number value )
Sets a ConVar's value to the input number after converting it to an integer. This can only be ran on ConVars created from within Lua.
ConVar:SetString( string value )
Sets a ConVar's value to the input string. This can only be ran on ConVars created from within Lua.

Page Links


Special Pages


Wikis

?

Render Time: 30ms

Session 0
DB GetPage 2
Generate Html 8
SaveChanges 11
Render Body 0
Render Sidebar 7