From SA-MP Wiki

Jump to: navigation, search

Image:50px-Ambox_outdated_serious.png This function, as of 0.3.7 R2, is deprecated. Please see GetConsoleVarAsBool


Get the boolean value of a server variable.

(const varname[])
const varname[]The name of the boolean variable to get the value of.

Return Values:

The value of the specified server variable. 0 if the specified server variable is not a boolean or doesn't exist.

Example Usage:

public OnGameModeInit()
    new queryEnabled = GetServerVarAsBool("query");
        print("WARNING: Querying is disabled. The server will appear offline in the server browser.");
    return 1;


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

Related Functions

The following functions may be helpful as they relate to this function in one way or another.

Personal tools