Namespace: CFXAPI set: shared
GET_CONVAR
// GetConvar
char* GET_CONVAR(char* varName, char* default_);
Returns: Returns the convar value if it can be found, otherwise it returns the assigned default
.
Can be used to get a console variable of type char*
, for example a string.
Examples:
if GetConvar('voice_useNativeAudio', 'false') == 'true' then
Citizen.Trace('Native Audio is enabled.')
end