---
name: "getItemCargo"
type: command
status: ok
groups: ["Vehicle Inventory"]
arma3_since: "0.50"
locality: {"argument": "global", "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/getItemCargo
revid: 378322
updated: 2026-04-02T16:23:27Z
---

# getItemCargo

*Command · Vehicle Inventory · Arma 3 v0.50*

Locality: arguments **global**

## Description

Returns all items names and count from ammo box (or any general weapon holder container).

## Syntax

```sqf
getItemCargo box
```

**Parameters:**

- `box`: [Object](../topics/Object.md)

**Returns:** [Array](../topics/Array.md) with [classes, counts]
- classes: [Array](../topics/Array.md) of [String](../topics/String.md)s - Item class names
- counts: [Array](../topics/Array.md) of [Number](../topics/Number.md)s - Item counts

## Examples

### Example 1

```sqf
getItemCargo cursorTarget;
/*
    returns e.g
    [
        ["5ItemA", "10ItemB"]
        [5, 10]
    ]
*/
```

## See also

[itemCargo](../commands/itemCargo.md) · [addItemCargo](../commands/addItemCargo.md) · [addItemCargoGlobal](../commands/addItemCargoGlobal.md) · [clearItemCargo](../commands/clearItemCargo.md) · [clearItemCargoGlobal](../commands/clearItemCargoGlobal.md)

<sub>Source: [BI Community Wiki — getItemCargo](https://community.bistudio.com/wiki/getItemCargo) (revision 378322).</sub>
