G.CreateConVar
From GMod Wiki
Function | |
Syntax |
CreateConVar( String convar, String value [, Integer flags OR Table flagtable, String HelpText ] ) Where is this used? |
Description: | |
Used for the creation of convars. | |
Returns: | Convar |
Part of Library: | Global Functions |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=G.CreateConVar]G.CreateConVar [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | This example was pulled from constraint.lua. |
---|---|
Used on | |
Code | CreateConVar( "gmod_physiterations", "2", { FCVAR_REPLICATED, FCVAR_ARCHIVE } ) |
Output | none. |
Additional Notes
- These are the flags that are in the includes\enum\cvar.lua file.
SHARED | 0000000000000000 | 00000000000000000000000000000000 | NONE SHARED | 0000000000000001 | 00000000000000000000000000000001 | UNREGISTERED SHARED | 0000000000000002 | 00000000000000000000000000000010 | DEVELOPMENTONLY SHARED | 0000000000000004 | 00000000000000000000000000000100 | GAMEDLL SHARED | 0000000000000008 | 00000000000000000000000000001000 | CLIENTDLL SHARED | 0000000000000032 | 00000000000000000000000000100000 | PROTECTED SHARED | 0000000000000064 | 00000000000000000000000001000000 | SPONLY SHARED | 0000000000000128 | 00000000000000000000000010000000 | ARCHIVE SHARED | 0000000000000256 | 00000000000000000000000100000000 | NOTIFY SHARED | 0000000000000512 | 00000000000000000000001000000000 | USERINFO SHARED | 0000000000001024 | 00000000000000000000010000000000 | PRINTABLEONLY SHARED | 0000000000002048 | 00000000000000000000100000000000 | UNLOGGED SHARED | 0000000000004096 | 00000000000000000001000000000000 | NEVER_AS_STRING SHARED | 0000000000008192 | 00000000000000000010000000000000 | REPLICATED SHARED | 0000000000016384 | 00000000000000000100000000000000 | CHEAT SHARED | 0000000000065536 | 00000000000000010000000000000000 | DEMO SHARED | 0000000000131072 | 00000000000000100000000000000000 | DONTRECORD SHARED | 0000000004194304 | 00000000010000000000000000000000 | NOT_CONNECTED SHARED | 0000000016777216 | 00000001000000000000000000000000 | ARCHIVE_XBOX SHARED | 0000000268435456 | 00010000000000000000000000000000 | SERVER_CAN_EXECUTE SHARED | 0000000536870912 | 00100000000000000000000000000000 | SERVER_CANNOT_QUERY SHARED | 0000001073741824 | 01000000000000000000000000000000 | CLIENTCMD_CAN_EXECUTE
See Also
- cvars.AddChangeCallback
- Explanation of what each convar flag does: http://developer.valvesoftware.com/wiki/Developer_Console_Control#The_FCVAR_flags