GetUserCVar

(This is for the ACS function. For the equivalent DECORATE function please click here.)

int GetUserCVar (int playernumber, str cvar)

Usage

Returns the value of a particular user cvar of a specific player.

Parameters

  • playernumber: The number of the player (0 to 7).
  • cvar: name of a console variable to get the value from.

Return value

The value of the specified console variable. The console variable must also be a proper user variable, such as the ones found in Player settings. This is only useful for cvars that can be represented as integers. Also note that you can create your own user variables by using the CVARINFO lump.

If no such console variable exists, if the console variable is not a proper user variable, or if the player is not in game (or the number is not a valid player number) it will return 0.

Examples

Note: This article lists no examples. If you make use of this feature in your own project(s) or know of any basic examples that could be shared, please add them. This will make it easier to understand for future authors seeking assistance. Your contributions are greatly appreciated.

See also

Console variable functions
GetCVarSetCVar
GetCVarStringSetCVarString
GetUserCVarSetUserCVar
GetUserCVarStringSetUserCVarString
CVARINFO
This article is issued from Zdoom. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.