Note, standard convars can only be used in server-side scripts. The second parameter being the default return value here as well. If you are sure that a convar will only contain an integer value, you may also use GetConvarInt('convar_name', 0) in a similar way of the GetConvar() function mentioned above. This is because if the convar has not been set yet, the default value that you provided will be returned by the GetConvar value. Local convarValue = GetConvar ( 'convar_name', 'Default convar value.' )Īs you might have spotted already, you will need to provide a default value.