RedM Natives

INVENTORY_GET_CHILDREN_IN_SLOT_COUNT

Hash0x033EE4B89F3AC545
Runtime nameInventoryGetChildrenInSlotCount
NamespaceINVENTORY
SideClient
NameOfficial
Docs
Since build1207

Signature

int INVENTORY_GET_CHILDREN_IN_SLOT_COUNT(int inventoryId, Any* guid, Hash slotId);

Parameters

NameTypeDescription
inventoryIdint—
guidAny*—
slotIdHash—

Returns int

Usage

Lua
local retval, guid = InventoryGetChildrenInSlotCount(inventoryId, slotId)

-- always works, by hash
local retval, guid = Citizen.InvokeNative(0x033EE4B89F3AC545, inventoryId, Citizen.PointerValueInt(), slotId, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const [retval, guid] = InventoryGetChildrenInSlotCount(inventoryId, slotId);

// by hash
const [retval, guid] = Citizen.invokeNative('0x033EE4B89F3AC545', inventoryId, Citizen.pointerValueInt(), slotId, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
var guid = new OutputArgument();
int retval = Function.Call<int>((Hash)0x033EE4B89F3AC545, inventoryId, guid, slotId);
// guid.GetResult<int>()
  • 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`.
  • Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.
  • Any* arguments are often structs. Build them with a DataView buffer and pass it with :Buffer() — see the examples and notes below.

Sources

alloc8or RDR3 NativeDB

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