warning Not Translated
This page has not been translated into the language that your browser requested yet. The English content is being shown as a fallback.
If you want to contribute a translation for this page then please click here.
GetConsoleVarAsInt
Description
Get the integer value of a console variable.
Name | Description |
---|---|
const cvar[] | The name of the integer variable to get the value of. |
Returns
The value of the specified console variable. 0 if the specified console variable is not an integer or doesn't exist.
Examples
new serverPort = GetConsoleVarAsInt("network.port");
printf("Server Port: %i", serverPort);
Notes
tip
Type 'varlist' in the server console to display a list of available console variables and their types.
Related Functions
- GetConsoleVarAsString: Retreive a server variable as a string.
- GetConsoleVarAsBool: Retreive a server variable as a boolean.