GetCVar (DECORATE)

From ZDoom Wiki
(Redirected from GetCvar)
Jump to navigation Jump to search
Note: This function is for DECORATE only. For ACS see here. For ZScript, use CVar.GetCVar (see Structs:CVar).


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"))
{
    // ...
}

See also