{"hash":"0x387246B7","ns":"CFX","name":"GET_RESOURCE_BY_FIND_INDEX","slug":"GET_RESOURCE_BY_FIND_INDEX","official":true,"named":true,"luaName":"GetResourceByFindIndex","game":"cfx","apiset":"shared","returnType":"char*","params":[{"name":"findIndex","type":"int","description":"The index of the resource (starting at 0)"}],"returnsDescription":"The resource name as a `string`","summary":"","descriptions":[],"examples":[{"lang":"lua","code":"local resourceList = {}\nfor i = 0, GetNumResources(), 1 do\n  local resource_name = GetResourceByFindIndex(i)\n  if resource_name and GetResourceState(resource_name) == \"started\" then\n    table.insert(resourceList, resource_name)\n  end\nend\nprint(table.unpack(resourceList))","source":"cfx"}],"aliases":[],"enums":[],"related":[],"sources":["cfx"],"doc":3,"url":"https://natives.borderlinerp.com/natives/CFX/GET_RESOURCE_BY_FIND_INDEX","markdownUrl":"https://natives.borderlinerp.com/natives/CFX/GET_RESOURCE_BY_FIND_INDEX.md","snippets":{"lua":"local retval = GetResourceByFindIndex(findIndex)","luaInvoke":"local retval = Citizen.InvokeNative(0x387246b7, findIndex, Citizen.ResultAsString())","js":"const retval = GetResourceByFindIndex(findIndex);","jsInvoke":"const retval = Citizen.invokeNative('0x387246b7', findIndex, Citizen.returnResultAnyway(), Citizen.resultAsString());","csharp":"string retval = Function.Call<string>((Hash)0x387246b7, findIndex);","notes":[]}}