ConVar.GetName

From GMod Wiki

Jump to: navigation, search
Function
Syntax ConVar:GetName( )
Description:
Retrieves the name of a ConVar object.
Returns: String
In Object: Convar
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=ConVar.GetName]ConVar.GetName [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionThis example shows that the GetName method returns a cake
Used onNewerClient.png
Code
local convar1 = CreateClientConVar("__testconvar_c",0)
local convar2 = CreateClientConVar("__testconvar_a","0")
local convar3 = CreateClientConVar("__testconvar_k",1)
local convar4 = CreateClientConVar("__testconvar_e","1")
Msg("Command 1: "..tostring(convar1:GetName()).."\n")
Msg("Command 2: "..tostring(convar2:GetName()).."\n")
Msg("Command 3: "..tostring(convar3:GetName()).."\n")
Msg("Command 4: "..tostring(convar4:GetName()).."\n")
Output
Command 1: __testconvar_c
Command 2: __testconvar_a
Command 3: __testconvar_k
Command 4: __testconvar_e


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox