RedM Natives

_INVENTORY_CREATE_ITEM_COLLECTION_2

Returns collectionId

Hash0x97A3646645727F42
Runtime nameInventoryCreateItemCollection_2
NamespaceINVENTORY
SideClient
NameCommunity guess
Docs
Since build1232

Signature

int _INVENTORY_CREATE_ITEM_COLLECTION_2(int* collectionSize);

Parameters

NameTypeDescription
collectionSizeint*—

Returns int

Description

Returns collectionId

Usage

Lua
local retval, collectionSize = InventoryCreateItemCollection_2(collectionSize)

-- always works, by hash
local retval, collectionSize = Citizen.InvokeNative(0x97A3646645727F42, Citizen.PointerValueIntInitialized(collectionSize), Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const [retval, collectionSize] = InventoryCreateItemCollection_2(collectionSize);

// by hash
const [retval, collectionSize] = Citizen.invokeNative('0x97A3646645727F42', Citizen.pointerValueIntInitialized(collectionSize), Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
var collectionSize = new OutputArgument();
int retval = Function.Call<int>((Hash)0x97A3646645727F42, collectionSize);
// collectionSize.GetResult<int>()
  • The last argument is an in/out pointer: pass its initial value, and the updated value is returned after the result.
  • 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.