RedM Natives

COMPENDIUM_GET_ENTRY_BY_STAT_ITEM

Hash0x66EC938394D76C85
Runtime nameCompendiumGetEntryByStatItem
NamespaceCOMPENDIUM
SideClient
NameOfficial
Docs
Since build1355

Signature

int COMPENDIUM_GET_ENTRY_BY_STAT_ITEM(Hash category, Hash animalType);

Parameters

NameTypeDescription
categoryHash—
animalTypeHash—

Returns int

Usage

Lua
local retval = CompendiumGetEntryByStatItem(category, animalType)

-- always works, by hash
local retval = Citizen.InvokeNative(0x66EC938394D76C85, category, animalType, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = CompendiumGetEntryByStatItem(category, animalType);

// by hash
const retval = Citizen.invokeNative('0x66EC938394D76C85', category, animalType, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0x66EC938394D76C85, category, animalType);
  • 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.