RedM Natives

_INVENTORY_GET_CHILDREN_COUNT

Hash0xE843D21A8E2498AA
Runtime nameInventoryGetChildrenCount
NamespaceINVENTORY
SideClient
NameCommunity guess
Docs
Since build1207

Signature

int _INVENTORY_GET_CHILDREN_COUNT(int inventoryId, Any* parentGuid);

Parameters

NameTypeDescription
inventoryIdint—
parentGuidAny*—

Returns int

Usage

Lua
local retval, parentGuid = InventoryGetChildrenCount(inventoryId, parentGuid)

-- always works, by hash
local retval, parentGuid = Citizen.InvokeNative(0xE843D21A8E2498AA, inventoryId, Citizen.PointerValueIntInitialized(parentGuid), Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const [retval, parentGuid] = InventoryGetChildrenCount(inventoryId, parentGuid);

// by hash
const [retval, parentGuid] = Citizen.invokeNative('0xE843D21A8E2498AA', inventoryId, Citizen.pointerValueIntInitialized(parentGuid), Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
var parentGuid = new OutputArgument();
int retval = Function.Call<int>((Hash)0xE843D21A8E2498AA, inventoryId, parentGuid);
// parentGuid.GetResult<int>()
  • The last argument is an in/out pointer: pass its initial value, and the updated value is returned after the result.
  • Any* arguments are often structs. Build them with a DataView buffer and pass it with :Buffer() — see the examples and notes below.
  • 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.