GetCVar (DECORATE)

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

This article is issued from Zdoom. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.