# INVENTORY::_INVENTORY_GET_INVENTORY_ID_FROM_PED

- **Hash:** `0x13D234A2A3F66E63`
- **Namespace:** INVENTORY
- **Runtime name (Lua/JS):** `InventoryGetInventoryIdFromPed`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/INVENTORY/_INVENTORY_GET_INVENTORY_ID_FROM_PED

## Signature

```c
int _INVENTORY_GET_INVENTORY_ID_FROM_PED(Ped ped);
```

## Parameters

- `ped` (`Ped`)

## Returns

`int`

## Description

Returns a unique inventory ID for this ped.
For the local player ped, it is an eInventories value.
For other peds, it is the inventory address casted to unsigned int.

enum eInventories
{
	INVENTORY_INVALID,
	INVENTORY_SP_PLAYER,
	INVENTORY_MP_PLAYER,
	INVENTORY_MP_MISSION,
	INVENTORY_SECOND_SCREEN,
	INVENTORY_SP_BACKUP,
	INVENTORY_SP_SNAPSHOT,
	INVENTORY_0xDE2AE452,
	INVENTORY_0x399D9B3A,
	INVENTORY_0x4BD43FA7,
	INVENTORY_0x9529D251,
	INVENTORY_0xA75776AC,
	INVENTORY_MAX_ID = 11,
	INVENTORY_IDS_COUNT
};

## Usage

### Lua

```lua
local retval = InventoryGetInventoryIdFromPed(ped)

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

### JavaScript

```js
const retval = InventoryGetInventoryIdFromPed(ped);

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

### C#

```csharp
int retval = Function.Call<int>((Hash)0x13D234A2A3F66E63, ped);
```

- The name is a community guess and may change. If the named call is missing in your client build, use `InvokeNative` with the hash — it always works.

*Sources: alloc8or RDR3 NativeDB.*
