Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!
Difference between revisions of "cvar"
From Quake Wiki
(Initial draft.) |
m (Redirect to DP_QC_CVAR_STRING instead of cvar_string.) |
||
Line 2: | Line 2: | ||
<code>float cvar(string name)</code> | <code>float cvar(string name)</code> | ||
− | Get the value of a named cvar. In order to get [[string]] values, you'll have to use a custom engine that supports the [[cvar_string]] builtin. | + | Get the value of a named cvar. In order to get [[string]] values, you'll have to use a custom engine that supports the [[DP_QC_CVAR_STRING|cvar_string]] builtin. |
====Parameters:==== | ====Parameters:==== |
Revision as of 00:48, 25 July 2023
Syntax:
float cvar(string name)
Get the value of a named cvar. In order to get string values, you'll have to use a custom engine that supports the cvar_string builtin.
Parameters:
name
- Name of the cvar to query.
Returns:
- Returns the numeric value of the named cvar.