GetCVar: Difference between revisions

From Eternity Wiki
Jump to navigationJump to search
(Created page with "{{ACSFunction|description=Get the value of an integer or string console variable. |usage= ''int'' '''GetCVar'''(''str cvar'') ''str'' '''GetCVarString'''(''str cvar'') |parameters= *''cvar'': console variable name |return=The value of the console variable, or 0 if unauthorized or inexistent. |notes=This only works with server variables, otherwise it will display an error and return 0. |id=ACC internal for '''GetCVar''', -56 for '''GetCVarString'''}}")
 
No edit summary
 
Line 7: Line 7:
*''cvar'': console variable name
*''cvar'': console variable name
|return=The value of the console variable, or 0 if unauthorized or inexistent.
|return=The value of the console variable, or 0 if unauthorized or inexistent.
|notes=This only works with server variables, otherwise it will display an error and return 0.
|notes=This only works with server variables affecting all players, otherwise it will display an error and return 0.
|id=ACC internal for '''GetCVar''', -56 for '''GetCVarString'''}}
|id=ACC internal for '''GetCVar''', -56 for '''GetCVarString'''}}

Latest revision as of 04:17, 10 May 2026

Description[edit]

This is an ACS built-in function.

Get the value of an integer or string console variable.

Usage[edit]

int GetCVar(str cvar)

str GetCVarString(str cvar)

Parameters[edit]

  • cvar: console variable name

Return value[edit]

The value of the console variable, or 0 if unauthorized or inexistent.

Examples[edit]

No examples given.

Notes[edit]

This only works with server variables affecting all players, otherwise it will display an error and return 0.

This function's identification in zspecial.acs is: ACC internal for GetCVar, -56 for GetCVarString.

See also[edit]