GetCVar (DECORATE)
(Redirected from GetCvar)
Jump to navigation
Jump to search
Warning: This function is for DECORATE only. In ZScript, server and nosave CVars are readable directly like global variables, and user CVars require CVar.GetCVar(). Check the CVARINFO page for more information.
For the ACS method of the same name, see GetCVar (ACS). |
double GetCVar (string cvar)
Usage
Retrieves the value of the specified console variable.
Parameters
- cvar: the name of the console variable to retrieve.
Return value
Returns the value of the console variable as a float. If the variable could not be found, or its scope is user and the calling actor is not a player, the function returns 0.
Examples
if (GetCVar("sv_infiniteammo")) { // ... }