RedM Natives

COMPENDIUM_GET_ENTRY_BY_INDEX_IN_SUBCATEGORY

Hash0x5CEB63B2E3D9895F
Runtime nameCompendiumGetEntryByIndexInSubcategory
NamespaceCOMPENDIUM
SideClient
NameOfficial
Docs
Since build1311

Signature

int COMPENDIUM_GET_ENTRY_BY_INDEX_IN_SUBCATEGORY(Hash category, Hash subcategory, int count);

Parameters

NameTypeDescription
categoryHash—
subcategoryHash—
countint—

Returns int

Usage

Lua
local retval = CompendiumGetEntryByIndexInSubcategory(category, subcategory, count)

-- always works, by hash
local retval = Citizen.InvokeNative(0x5CEB63B2E3D9895F, category, subcategory, count, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = CompendiumGetEntryByIndexInSubcategory(category, subcategory, count);

// by hash
const retval = Citizen.invokeNative('0x5CEB63B2E3D9895F', category, subcategory, count, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0x5CEB63B2E3D9895F, category, subcategory, count);
  • Hash parameters: the named function also accepts a string and hashes it for you; Citizen.InvokeNative needs the number — pass joaat("name") or a backtick literal like `name`.

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.