---
name: "compatibleWeapons"
type: command
status: ok
groups: ["Weapons"]
arma3_since: "2.22"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/compatibleWeapons
revid: 378898
updated: 2026-08-11T14:56:33Z
---

# compatibleWeapons

*Command · Weapons · Arma 3 v2.22*

## Description

Returns all compatible weapons for given weapon item, weapon magazine or weapon slot.

## Syntax

```sqf
compatibleWeapons name
```

**Parameters:**

- `name`: [String](../topics/String.md) - weapon item (see [compatibleItems](../commands/compatibleItems.md)), weapon magazine (see [compatibleMagazines](../commands/compatibleMagazines.md)) or weapon 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 [Array](../topics/Array.md)s in format:
- [weapon, slot] - for weapon items
- [weapon, muzzle] - for weapon magazines (primary muzzle returned as "this")
- [weapon, slot] - for weapon slot

## Examples

### Example 1

```sqf
compatibleWeapons "LaserBatteries"; // [["Laserdesignator_pilotCamera","this"],["Laserdesignator_mounted","this"],...]
```

### Example 2

```sqf
compatibleWeapons "PointerSlot"; // [["arifle_MX_ACO_pointer_F","PointerSlot"],["arifle_TRG21_F","PointerSlot"],...]
```

### Example 3

```sqf
compatibleWeapons "1Rnd_HE_Grenade_shell"; // [["arifle_Katiba_GL_F","EGLM"],["arifle_Katiba_GL_ACO_F","EGLM"],...]
```

### Example 4

```sqf
compatibleWeapons "bipod_01_F_blk"; // [["arifle_MX_ACO_pointer_F","UnderBarrelSlot"],["arifle_MX_F","UnderBarrelSlot"],...]
```

## See also

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

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