---
name: "addWeaponItem"
type: command
status: ok
groups: ["Unit Inventory"]
arma3_since: "1.38"
locality: {"argument": "local", "effect": "global", "server_exec": false}
source: https://community.bistudio.com/wiki/addWeaponItem
revid: 376456
updated: 2025-10-14T21:27:36Z
---

# addWeaponItem

*Command · Unit Inventory · Arma 3 v1.38*

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

## Description

Adds a weapon item to the specified weapon. The item can be weapon magazine, in which case the amount of ammo and target muzzle could also be specified. Since Arma 3 2.22 it is possible to add a magazine directly into a 'Throw' muzzle provided it is configured with `keepInInventory = 0;`. To remove such magazine see [removeWeaponItem](../commands/removeWeaponItem.md).

## Syntax

### Syntax 1

```sqf
unit addWeaponItem [weaponName, itemName, instant]
```

**Parameters:**

- `unit`: [Object](../topics/Object.md)
- `weaponName`: [String](../topics/String.md) - name of the weapon to add magazine to
- `itemName`: [String](../topics/String.md) - class name of the item to add (if magazine, muzzle will be autodetected)
- `instant`: [Boolean](../topics/Boolean.md) - (Optional, default [false](../commands/false.md)) [true](../commands/true.md) to skip animation *(since arma3 1.96)*

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

### Syntax 2

```sqf
unit addWeaponItem [weaponName, [itemName, ammoCount, muzzleName], instant]
```

**Parameters:**

- `unit`: [Object](../topics/Object.md)
- `weaponName`: [String](../topics/String.md) - name of the weapon to add magazine to
- `itemName`: [String](../topics/String.md) - class name of the item to add (if magazine, muzzle will be autodetected unless specified)
- `ammoCount`: [Number](../topics/Number.md) - (Optional) optional amount of ammo in magazine
- `muzzleName`: [String](../topics/String.md) - (Optional) optional target muzzle to add magazine to
- `instant`: [Boolean](../topics/Boolean.md) - (Optional, default [false](../commands/false.md)) [true](../commands/true.md) to skip animation *(since arma3 1.96)*

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

## Examples

### Example 1

```sqf
player addWeaponItem ["arifle_MX_GL_ACO_F", "1Rnd_HE_Grenade_shell"];
```

### Example 2

```sqf
player addWeaponItem ["arifle_MX_GL_ACO_F", ["1Rnd_HE_Grenade_shell", 1, "GL_3GL_F"]];
```

### Example 3

```sqf
player addWeaponItem ["LaserDesignator", "LaserBatteries"];
```

## See also

[removeWeaponItem](../commands/removeWeaponItem.md) · [addPrimaryWeaponItem](../commands/addPrimaryWeaponItem.md) · [addSecondaryWeaponItem](../commands/addSecondaryWeaponItem.md) · [addHandgunItem](../commands/addHandgunItem.md) · [addBinocularItem](../commands/addBinocularItem.md) · [weaponsItems](../commands/weaponsItems.md) · [handgunItems](../commands/handgunItems.md) · [primaryWeaponItems](../commands/primaryWeaponItems.md) · [secondaryWeaponItems](../commands/secondaryWeaponItems.md) · [binocularItems](../commands/binocularItems.md) · [removePrimaryWeaponItem](../commands/removePrimaryWeaponItem.md) · [removeSecondaryWeaponItem](../commands/removeSecondaryWeaponItem.md) · [removeHandgunItem](../commands/removeHandgunItem.md) · [removeBinocularItem](../commands/removeBinocularItem.md)

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