G.GetConVar

From GMod Wiki

Jump to: navigation, search
Function
Syntax GetConVar( String name )
Where is this used?
Description:
Returns convar with supplied name
Returns: Convar
Part of Library: Global Functions
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=G.GetConVar]G.GetConVar [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Example

DescriptionGet convar of "maxscorelimit".
Used onNewerShared.png
Code
CreateConVar( "maxscorelimit", "10", FCVAR_REPLICATED + FCVAR_NOTIFY + FCVAR_ARCHIVE ) //default this convar to 10
local maxscore = GetConVar("maxscorelimit"):GetInt()
print(maxscore) 
Output10
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox