Namespace: CFXAPI set: shared
GET_CONVAR_INT
// GetConvarInt
int GET_CONVAR_INT(char* varName, int default_);
Parameters:- varName:
The console variable to look up.
- default_:
The default value to set if none is found (variable not set using SET_CONVAR, or not accessible).
Returns: Returns the convar value if it can be found, otherwise it returns the assigned default
.
Can be used to get a console variable casted back to int
(an integer value).
Examples:
if GetConvarInt('remainingRounds', 0) < 900 then
Citizen.Trace("Less than 900 rounds remaining...")
end