cvars.GetConVarCallbacks

From GMod Wiki

Jump to: navigation, search
Warning 64 light.png Internal Function: cvars.GetConVarCallbacks
cvars.GetConVarCallbacks is an internal function. This means you will be able to call it, but you really shouldn't.


Function
Syntax cvars.GetConVarCallbacks( String ConVarName, Boolean CreateIfNotFound )
Where is this used?
Description:
Returns a table of callbacks for that convar. CreateIfNotFound will create an empty table if there are no callbacks.
Returns: nil
Part of Library: cvars
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Cvars.GetConVarCallbacks]Cvars.GetConVarCallbacks [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionFrom the cvars module.
Used onNewerShared.png
Code
	local Callbacks = GetConVarCallbacks( name )
	if (!Callbacks) then return end
 
	for k, v in pairs( Callbacks ) do
 
		pcall( v, name, oldvalue, newvalue )
 
	end
 
OutputN/A
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox