# COMPENDIUM::COMPENDIUM_GET_ENTRY_BY_PED_INDEX

- **Hash:** `0x1CFA0219D8E1CF25`
- **Namespace:** COMPENDIUM
- **Runtime name (Lua/JS):** `CompendiumGetEntryByPedIndex`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** named only
- **Since game build:** 1311
- **URL:** https://natives.borderlinerp.com/natives/COMPENDIUM/COMPENDIUM_GET_ENTRY_BY_PED_INDEX

## Signature

```c
int COMPENDIUM_GET_ENTRY_BY_PED_INDEX(Hash category, Ped ped);
```

## Parameters

- `category` (`Hash`)
- `ped` (`Ped`)

## Returns

`int`

## Usage

### Lua

```lua
local retval = CompendiumGetEntryByPedIndex(category, ped)

-- always available, by hash
local retval = Citizen.InvokeNative(0x1CFA0219D8E1CF25, category, ped, Citizen.ResultAsInteger())
```

### JavaScript

```js
const retval = CompendiumGetEntryByPedIndex(category, ped);

// by hash
const retval = Citizen.invokeNative('0x1CFA0219D8E1CF25', category, ped, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
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.*
