Source2Toolkit
Core apiHigh level

Convars

convars

Functions

UTIL_FindConVar(name)

Finds a ConVar by name.

Parameters
  • name const char* — ConVar name (e.g. "sv_cheats")

UTIL_GetConVarInt(accessIndex)

Gets integer value of a ConVar.

Parameters
  • accessIndex uint16

UTIL_GetConVarFloat(accessIndex)

Gets float value of a ConVar.

Parameters
  • accessIndex uint16

UTIL_GetConVarBool(accessIndex)

Gets boolean value of a ConVar.

Parameters
  • accessIndex uint16

UTIL_SetConVarInt(accessIndex, value)

Sets integer value of a ConVar.

Parameters
  • accessIndex uint16
  • value int

UTIL_SetConVarFloat(accessIndex, value)

Sets float value of a ConVar.

Parameters
  • accessIndex uint16
  • value float

UTIL_SetConVarBool(accessIndex, value)

Sets boolean value of a ConVar.

Parameters
  • accessIndex uint16
  • value bool

UTIL_GetConVarString(accessIndex)

Gets string value of a ConVar.

Parameters
  • accessIndex uint16

UTIL_SetConVarString(accessIndex, value)

Sets string value of a ConVar.

Parameters
  • accessIndex uint16
  • value const char*

UTIL_GetConVarValueAddress(accessIndex)

Gets raw pointer to ConVar value.

Parameters
  • accessIndex uint16

UTIL_SetConVarValue(accessIndex, value)

Sets raw value of a ConVar.

Parameters
  • accessIndex uint16
  • value const void* — Pointer to value (type depends on ConVar type)

On this page