ConVar

From GMod Wiki

Jump to: navigation, search

This is the object returned by the CreateConVar, CreateClientConVar and GetConVar functions.

What is a ConVar?

  "The console provides a command-line interface for the advanced configuration of Source games.
Just about any configuration task can be completed from the console, and in fact many have to be.
Entered commands come in two forms: commands and variables. Commands are simply keywords,
but variables ("CVars" or "ConVars") require a value of some sort before they are accepted.
When a ConVar is given a value it will store that value."

- Valve Wiki

You can set convars using RunConsoleCommand, and get convars using GetConVar. You can create them using CreateConVar or CreateClientConVar

Object Methods

NewerShared.png ConVar:__index
NewerShared.png ConVar:GetBool
NewerShared.png ConVar:GetDefault
NewerShared.png ConVar:GetFloat
NewerShared.png ConVar:GetHelpText
NewerShared.png ConVar:GetInt
NewerShared.png ConVar:GetName
NewerShared.png ConVar:GetString

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox