The Lab
INVENTORY native

_INVENTORY_CREATE_SORTED_COLLECTION

returns int3 paramsbuild 1311

Based on its name and signature, here is our best reading:

Builds a sorted collection of items from inventory inventoryId, writing its size to size. Returns the collection id.

Signature

C
int _INVENTORY_CREATE_SORTED_COLLECTION(int inventoryId, int p1, int* size); // 0xBB7F968675B34B0C b1311

Parameters

#NameType
1inventoryIdint
2p1int
3sizeint* (out pointer)

Facts

Facts about _INVENTORY_CREATE_SORTED_COLLECTION
Name
_INVENTORY_CREATE_SORTED_COLLECTION
Hash
0xBB7F968675B34B0C
Namespace
Returns
int
Game build
1311

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local result, size = Citizen.InvokeNative(0xBB7F968675B34B0C, -- _INVENTORY_CREATE_SORTED_COLLECTION
  0, -- int inventoryId
  0, -- int p1
  Citizen.PointerValueInt(), -- int* size
  Citizen.ResultAsInteger()
)
print(result, size)
JavaScript
const [result, size] = Citizen.invokeNative("0xBB7F968675B34B0C", // _INVENTORY_CREATE_SORTED_COLLECTION
  0, // int inventoryId
  0, // int p1
  Citizen.pointerValueInt(), // int* size
  Citizen.resultAsInteger()
);
console.log(result, size)
C#
var sizeArg = new OutputArgument();
int result = Function.Call<int>((Hash)0xBB7F968675B34B0C, // _INVENTORY_CREATE_SORTED_COLLECTION
  0, // int inventoryId
  0, // int p1
  sizeArg // int* size
);
int size = sizeArg.GetResult<int>();
All INVENTORY natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.