---
name: "compatibleItems"
type: command
status: ok
groups: ["Weapons"]
arma3_since: "2.10"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/compatibleItems
revid: 376857
updated: 2025-12-08T20:38:25Z
---

# compatibleItems

*Command · Weapons · Arma 3 v2.10*

## Description

Returns all items (attachments) that can be mounted on the given weapon.

## Syntax

### Syntax 1

```sqf
compatibleItems weapon
```

**Parameters:**

- `weapon`: [String](../topics/String.md) - weapon class name

**Returns:** [Array](../topics/Array.md) of [String](../topics/String.md)s - compatible attachments

### Syntax 2

```sqf
compatibleItems [weapon, slot]
```

**Parameters:**

- `weapon`: [String](../topics/String.md) - weapon class name
- `slot`: [String](../topics/String.md) - class name of the slot (defined under **WeaponSlotsInfo** class in weapon config), for example:
  - "CowsSlot" for optics
  - "MuzzleSlot" for silencers
  - "PointerSlot" for laser pointers and flashlights
  - "UnderBarrelSlot" for bipods

**Returns:** [Array](../topics/Array.md) of [String](../topics/String.md)s - compatible attachments

## Examples

### Example 1

```sqf
compatibleItems "arifle_Katiba_GL_F"; // ["optic_Nightstalker","optic_tws","optic_tws_mg","optic_NVS", ...]
```

### Example 2

```sqf
compatibleItems ["arifle_Katiba_GL_F", "PointerSlot"]; // ["acc_flashlight","acc_flashlight_broken","acc_pointer_IR", ...]
```

## See also

[compatibleWeapons](../commands/compatibleWeapons.md) · [compatibleMagazines](../commands/compatibleMagazines.md) · [BIS_fnc_compatibleItems](../functions/BIS_fnc_compatibleItems.md) · [canAdd](../commands/canAdd.md)

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