---
name: "weaponsInfo"
type: command
status: ok
groups: ["Weapons"]
arma3_since: "2.10"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/weaponsInfo
revid: 377065
updated: 2026-01-01T09:09:48Z
---

# weaponsInfo

*Command · Weapons · Arma 3 v2.10*

## Description

Returns entity's weapons information including weapon index and firemode.

## Syntax

```sqf
unit weaponsInfo [weaponOrMuzzle, onlyLoaded]
```

**Parameters:**

- `unit`: [Object](../topics/Object.md) - person
- `weaponOrMuzzle`: [String](../topics/String.md) - name of the weapon or muzzle (returns whichever matches first) or "" to return all weapons
- `onlyLoaded`: [Boolean](../topics/Boolean.md) - (Optional, default [false](../commands/false.md)) [true](../commands/true.md) to return loaded weapons only

**Returns:** [Array](../topics/Array.md) of [Array](../topics/Array.md)s with [weaponIndex, isSelected, weaponName, muzzleName, firemode, magazineName, ammoCount, isPrimary] (or an empty []):
- weaponIndex: [Number](../topics/Number.md) - internal weapon index (changes frequently) used with "SwitchWeapon" and "UseWeapon" [action](../commands/action.md)s
- isSelected: [Boolean](../topics/Boolean.md) - [true](../commands/true.md) if this weapon is currently selected
- weaponName: [String](../topics/String.md) - weapon name
- muzzleName: [String](../topics/String.md) - muzzle name
- firemode: [String](../topics/String.md) - firemode that is set for this 'weaponIndex'
- magazineName: [String](../topics/String.md) - name of the loaded magazine or ""
- ammoCount: [Number](../topics/Number.md) - magazine ammo count or -1
- isPrimary: [Boolean](../topics/Boolean.md) - [true](../commands/true.md) if this muzzle is considered primary by the engine (Since Arma 3 2.14)

## Examples

### Example 1

Find weapon with FullAuto firemode and switch to it: 

```sqf
private _weapons = player weaponsInfo [currentMuzzle player, true];
private _found = _weapons findIf { _x select 4 == "FullAuto" };
if (_found > -1) then { action ["SwitchWeapon", player, player, _weapons select _found select 0] };
```

## See also

[weaponState](../commands/weaponState.md) · [weaponReloadingTime](../commands/weaponReloadingTime.md) · [action](../commands/action.md)

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