RedM Natives

COMPENDIUM_GET_ENTRY_BY_PED_INDEX

Hash0x1CFA0219D8E1CF25
Runtime nameCompendiumGetEntryByPedIndex
NamespaceCOMPENDIUM
SideClient
NameOfficial
Docs
Since build1311

Signature

int COMPENDIUM_GET_ENTRY_BY_PED_INDEX(Hash category, Ped ped);

Parameters

NameTypeDescription
categoryHash—
pedPed—

Returns int

Usage

Lua
local retval = CompendiumGetEntryByPedIndex(category, ped)

-- always works, by hash
local retval = Citizen.InvokeNative(0x1CFA0219D8E1CF25, category, ped, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = CompendiumGetEntryByPedIndex(category, ped);

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