# INVENTORY::_INVENTORY_GET_CHILDREN_COUNT

- **Hash:** `0xE843D21A8E2498AA`
- **Namespace:** INVENTORY
- **Runtime name (Lua/JS):** `InventoryGetChildrenCount`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** named only
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/INVENTORY/_INVENTORY_GET_CHILDREN_COUNT

## Signature

```c
int _INVENTORY_GET_CHILDREN_COUNT(int inventoryId, Any* parentGuid);
```

## Parameters

- `inventoryId` (`int`)
- `parentGuid` (`Any*`)

## Returns

`int`

## Usage

### Lua

```lua
local retval, parentGuid = InventoryGetChildrenCount(inventoryId, parentGuid)

-- always available, by hash
local retval, parentGuid = Citizen.InvokeNative(0xE843D21A8E2498AA, inventoryId, Citizen.PointerValueIntInitialized(parentGuid), Citizen.ResultAsInteger())
```

### JavaScript

```js
const [retval, parentGuid] = InventoryGetChildrenCount(inventoryId, parentGuid);

// by hash
const [retval, parentGuid] = Citizen.invokeNative('0xE843D21A8E2498AA', inventoryId, Citizen.pointerValueIntInitialized(parentGuid), Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
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.*
