ConVar Class

A ConVar is a configurable, named setting in the srcds console.

Methods 14

Name Description
AddChangeHook

Creates a hook for when a console variable's value is changed.

GetBounds

Retrieves the specified bound of a console variable.

GetDefault

Retrieves the default string value of a console variable.

GetDescription

Retrieves the description of a console variable.

GetName

Retrieves the name of a console variable.

GetString

Retrieves the string value of a console variable.

RemoveChangeHook

Removes a hook for when a console variable's value is changed.

ReplicateToClient

Replicates a convar value to a specific client. This does not change the actual convar value.

RestoreDefault

Resets the console variable to its default value.

SetBool

Sets the boolean value of a console variable.

SetBounds

Sets the specified bound of a console variable.

SetFloat

Sets the floating point value of a console variable.

SetInt

Sets the integer value of a console variable.

SetString

Sets the string value of a console variable.

Properties 5

Name Type Description
BoolValuebool

Retrieves or sets a boolean value for the convar.

IntValueint

Retrieves or sets an integer value for the convar.

FloatValuefloat

Retrieves or sets a float value for the convar.

Flagsint

Gets or sets the flag bits (FCVAR_*) on the convar.

PluginHandle

Retrieves the plugin handle of the convar's creator