{"hash":"0x935C0AB2","ns":"CFX","name":"GET_CONVAR_INT","slug":"GET_CONVAR_INT","official":true,"named":true,"luaName":"GetConvarInt","game":"cfx","apiset":"shared","returnType":"int","params":[{"name":"varName","type":"char*","description":"The console variable to look up."},{"name":"default_","type":"int","description":"The default value to set if none is found (variable not set using [SET_CONVAR](#\\_0x341B16D2), or not accessible)."}],"returnsDescription":"Returns the convar value if it can be found, otherwise it returns the assigned `default`.","summary":"Can be used to get a console variable casted back to int (an integer value).","descriptions":[{"source":"cfx","format":"md","body":"Can be used to get a console variable casted back to `int` (an integer value)."}],"examples":[{"lang":"lua","code":"if GetConvarInt('remainingRounds', 0) < 900 then\n    Citizen.Trace(\"Less than 900 rounds remaining...\")\nend","source":"cfx"}],"aliases":[],"enums":[],"related":[],"sources":["cfx"],"doc":3,"url":"https://natives.borderlinerp.com/natives/CFX/GET_CONVAR_INT","markdownUrl":"https://natives.borderlinerp.com/natives/CFX/GET_CONVAR_INT.md","snippets":{"lua":"local retval = GetConvarInt(varName, default_)","luaInvoke":"local retval = Citizen.InvokeNative(0x935c0ab2, varName, default_, Citizen.ResultAsInteger())","js":"const retval = GetConvarInt(varName, default_);","jsInvoke":"const retval = Citizen.invokeNative('0x935c0ab2', varName, default_, Citizen.returnResultAnyway(), Citizen.resultAsInteger());","csharp":"int retval = Function.Call<int>((Hash)0x935c0ab2, varName, default_);","notes":[]}}