Global/GetConVar

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
(Note about internal behaviour)
Line 1: Line 1:
 
{{Func
 
{{Func
|Description=Gets the {{Type|ConVar}} with the specified name. This function caches the ConVar object internally.
+
|Description=Gets the {{Type|ConVar}} with the specified name. This function caches the {{Type|ConVar}} object internally.
 +
 
 +
{{Note|This function uses {{GlobalFunction|GetConVar_Internal}} internally, but caches the result in Lua for quicker lookups.}}
 
|Realm=Shared and Menu
 
|Realm=Shared and Menu
 
|IsClass=No
 
|IsClass=No

Revision as of 20:10, 2 December 2019

 GetConVar( )

Description

Gets the ConVar with the specified name. This function caches the ConVar object internally.

NOTE

This function uses GetConVar_Internal internally, but caches the result in Lua for quicker lookups.

Arguments

string name

Name of the ConVar to get

Returns

ConVar

The ConVar object, or nil if no such ConVar was found.
Personal tools
Navigation