---
name: "addWeaponCargo"
type: command
status: ok
groups: ["Containers"]
arma3_since: "0.50"
locality: {"argument": "global", "effect": "local", "server_exec": false}
source: https://community.bistudio.com/wiki/addWeaponCargo
revid: 376383
updated: 2025-10-09T02:14:03Z
---

# addWeaponCargo

*Command · Containers · Arma 3 v0.50 · introduced in Operation Flashpoint v1.00*

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

## Description

Add weapons to the cargo space of vehicles, which can be taken out by infantry units. Ignores available cargo space.

> [!NOTE]
> **Arma 3:** In Arma 3, arguments for this command must be local (Local Argument). For global variant see [addWeaponCargoGlobal](../commands/addWeaponCargoGlobal.md).

## Syntax

```sqf
vehicleName addWeaponCargo [weaponName, count]
```

**Parameters:**

- `vehicleName`: [Object](../topics/Object.md) - vehicle to which add the weapons
- `weaponName`: [String](../topics/String.md) - weapon name. See Category:Weapons for reference about possible values
- `count`: [Number](../topics/Number.md) - number of weapons to add. Arma 3 v2.14 negative count will remove weapons.

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

## Examples

### Example 1

```sqf
_truck addWeaponCargo ["M16", 5];
```

## See also

[addWeaponCargoGlobal](../commands/addWeaponCargoGlobal.md) · [addMagazineCargo](../commands/addMagazineCargo.md) · [addMagazineCargoGlobal](../commands/addMagazineCargoGlobal.md) · [clearMagazineCargo](../commands/clearMagazineCargo.md) · [clearWeaponCargo](../commands/clearWeaponCargo.md) · [getWeaponCargo](../commands/getWeaponCargo.md) · [addItemCargo](../commands/addItemCargo.md) · [addItemCargoGlobal](../commands/addItemCargoGlobal.md) · [addBackpackCargo](../commands/addBackpackCargo.md) · [addBackpackCargoGlobal](../commands/addBackpackCargoGlobal.md) · [addWeaponWithAttachmentsCargo](../commands/addWeaponWithAttachmentsCargo.md)

## Community notes

**Galzohar** — 2010-07-10

When players add/remove gear directly via the gear menu that gear is synchronized across the network. Since this command is local only, using it during a mission can cause all sorts of weird issues. To get proper synchronization use this command in the object's init line or in a script called from its init line with a **call compile preprocessFile** command (and *not* **execVM**).

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