---
name: "addItemCargo"
type: command
status: ok
groups: ["Vehicle Inventory"]
arma3_since: "0.50"
locality: {"argument": "local", "effect": "local", "server_exec": false}
source: https://community.bistudio.com/wiki/addItemCargo
revid: 341379
updated: 2023-05-25T12:43:57Z
---

# addItemCargo

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

Locality: arguments **local** · effect **local**

## Description

Creates new items and stores them in given container.
Works with items, weapons, magazines, equipment and glasses but not backpacks.
In the latter case use [addBackpackCargo](../commands/addBackpackCargo.md) instead. For the global variant, see [addItemCargoGlobal](../commands/addItemCargoGlobal.md).

## Syntax

```sqf
box addItemCargo [item, count]
```

**Parameters:**

- `box`: [Object](../topics/Object.md)
- `item`: [String](../topics/String.md)
- `count`: [Number](../topics/Number.md) - number of items to add; Arma 3 v2.14 a negative value removes items

**Returns:** [Nothing](../topics/Nothing.md)

## Examples

### Example 1

```sqf
supplyBox addItemCargo ["optic_ARCO", 10];
```

## See also

[addItemCargoGlobal](../commands/addItemCargoGlobal.md) · [clearItemCargo](../commands/clearItemCargo.md) · [addMagazineCargo](../commands/addMagazineCargo.md) · [addMagazineCargoGlobal](../commands/addMagazineCargoGlobal.md) · [addWeaponCargo](../commands/addWeaponCargo.md) · [addWeaponCargoGlobal](../commands/addWeaponCargoGlobal.md) · [addBackpackCargo](../commands/addBackpackCargo.md) · [addBackpackCargoGlobal](../commands/addBackpackCargoGlobal.md)

## Community notes

**7erra** — 2021-11-20

Make sure that you are using the classname from CfgWeapons, CfgMagazines or CfgGlasses! Placing an item in Eden Editor places the container of the item, not the item itself.
To get the item classname you can open the config of the placed container in the Config Viewer and look for a subclass called "TransportItems".
The correct classname is stored under `configFile >> "CfgVehicles" >> _containerClass >> "TransportItems" >> "some_classname" >> "name"`.

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