GetConsoleVarAsInt

From SA-MP Wiki

Jump to: navigation, search


Description:

Get the integer value of a console variable.


Parameters:
(const varname[])
const varname[]The name of the integer variable to get the value of.


Return Values:

The value of the specified console variable. 0 if the specified console variable is not an integer or doesn't exist.


Example Usage:

new serverPort = GetConsoleVarAsInt("port");
printf("Server Port: %i", serverPort);
Tip

Image:Light_bulb_icon.png

Type 'varlist' in the server console to display a list of available console variables and their types.


Related Functions

The following functions may be useful, as they are related to this function in one way or another.

Personal tools
Navigation
Toolbox