---
name: "currentWeaponMode"
type: command
status: ok
groups: ["Weapons"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/currentWeaponMode
revid: 379327
updated: 2026-10-30T23:51:46Z
---

# currentWeaponMode

*Command · Weapons · Arma 3 v0.50 · introduced in Arma 2: Operation Arrowhead v1.50*

## Description

Returns current weapon mode of unit's weapon.

> [!WARNING]
> This command will return 0 [Number](../topics/Number.md) if given object is a vehicle instead of a person.\
> You can alternatively use
>
> ```sqf
> _muzzle = weaponState player select 2;
> ```

## Syntax

```sqf
currentWeaponMode gunner
```

**Parameters:**

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

**Returns:** [String](../topics/String.md) - current mode's classname

## Examples

### Example 1

```sqf
_weaponMode = currentWeaponMode player;
```

### Example 2

```sqf
_weaponMode = currentWeaponMode gunner vehicle player;
```

## See also

ArmA: Actions · [currentWeapon](../commands/currentWeapon.md)

## Community notes

**Pierre MGI** — 2014-09-27

- Be careful using this in script. This function returns these strings but also:\
\- 0 if unit is in a vehicle (pax),\
\- absolutely nothing if AH-99 helo driver or all weapons removed,\
\- "truckhorn2" if Hunter driver...\
Absolutely nothing means: if you use a hint to display the returned value, you obtain absolutely no text,no black box, no error! Hint isn't displayed and there is no error in rpt file with compile preprocessFileLineNumbers.

On the other hand, returned value 0 when unit is pax of a vehicle, could lead to a variable error type if your script is waiting for a string.

---

**Sarogahtyp** — 2022-07-04

To set the firemode of the current weapon of a player, simply use the workaround described by Killzone_Kid in the first note of the [forceWeaponFire](../commands/forceWeaponFire.md) wiki entry:

```sqf
_weapon = currentWeapon player;
_ammo = player ammo _weapon;
player setAmmo [_weapon, 0];
player forceWeaponFire [_weapon, "FullAuto"];
player setAmmo [_weapon, _ammo];
```

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