---
name: "primaryWeaponItems"
type: command
status: ok
groups: ["Unit Inventory"]
arma3_since: "0.50"
locality: {"argument": "global", "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/primaryWeaponItems
revid: 378479
updated: 2026-04-24T11:51:13Z
---

# primaryWeaponItems

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

Locality: arguments **global**

## Description

Returns array with all items assigned to the [primaryWeapon](../commands/primaryWeapon.md) except magazines. Use [primaryWeaponMagazine](../commands/primaryWeaponMagazine.md) command for the latter. This command is used for infantry weapons only.

## Syntax

```sqf
primaryWeaponItems unit
```

**Parameters:**

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

**Returns:** [Array](../topics/Array.md) with [muzzle, rail, optic, bipod]
- muzzle: [String](../topics/String.md) - class name of the muzzle attachment (silencer, flash hider)
- rail: [String](../topics/String.md) - class name of the rail attachement (laserpointer/flashlight)
- optic: [String](../topics/String.md)
- bipod: [String](../topics/String.md)

## Examples

### Example 1

```sqf
primaryWeaponItems player;
/*
[
    "muzzle_snds_H",    // silencer
    "acc_pointer_IR",    // laser
    "optic_Aco",        // optics
    "bipod_01_F_blk"    // bipod
]
*/
```

## See also

[addPrimaryWeaponItem](../commands/addPrimaryWeaponItem.md) · [removePrimaryWeaponItem](../commands/removePrimaryWeaponItem.md) · [removeAllPrimaryWeaponItems](../commands/removeAllPrimaryWeaponItems.md) · [weaponAccessories](../commands/weaponAccessories.md) · [weaponAccessoriesCargo](../commands/weaponAccessoriesCargo.md) · [handgunItems](../commands/handgunItems.md) · [binocularItems](../commands/binocularItems.md) · [secondaryWeaponItems](../commands/secondaryWeaponItems.md) · [weaponsItems](../commands/weaponsItems.md) · [weaponsItemsCargo](../commands/weaponsItemsCargo.md)

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