RedM Natives

_INVENTORY_GET_INVENTORY_ID_FROM_PED

Returns a unique inventory ID for this ped.

Hash0x13D234A2A3F66E63
Runtime nameInventoryGetInventoryIdFromPed
NamespaceINVENTORY
SideClient
NameCommunity guess
Docs
Since build1207

Signature

int _INVENTORY_GET_INVENTORY_ID_FROM_PED(Ped ped);

Parameters

NameTypeDescription
pedPed—

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
local retval = InventoryGetInventoryIdFromPed(ped)

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

// by hash
const retval = Citizen.invokeNative('0x13D234A2A3F66E63', ped, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
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

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