---
name: "canFire"
type: command
status: ok
groups: ["Weapons"]
arma3_since: "0.50"
locality: {"argument": "global", "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/canFire
revid: 377852
updated: 2026-01-03T21:50:58Z
---

# canFire

*Command · Weapons · Arma 3 v0.50 · introduced in Operation Flashpoint v1.00*

Locality: arguments **global**

## Description

Returns [true](../commands/true.md) if the given vehicle is still able to fire.
For the command to return [true](../commands/true.md), vehicle must be alive, have weapon operator and the weapon cannot be damaged ≥ 0.9 but can be empty due to running out of ammo.
If mission starts with vehicle having no ammo or [setVehicleAmmo](../commands/setVehicleAmmo.md) 0 command is executed on the vehicle, then [canFire](../commands/canFire.md) will always report [false](../commands/false.md) for it.

## Syntax

```sqf
canFire unitName
```

**Parameters:**

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

**Returns:** [Boolean](../topics/Boolean.md) - [true](../commands/true.md) if able to fire

## Examples

### Example 1

```sqf
if (not canFire _tank) then
{
    player sideChat "Tank disabled!";
};
```

## See also

[canMove](../commands/canMove.md) · [canStand](../commands/canStand.md) · [fire](../commands/fire.md) · [doFire](../commands/doFire.md) · [commandFire](../commands/commandFire.md) · [fireAtTarget](../commands/fireAtTarget.md) · [forceWeaponFire](../commands/forceWeaponFire.md) · [commandArtilleryFire](../commands/commandArtilleryFire.md) · [commandSuppressiveFire](../commands/commandSuppressiveFire.md) · [doArtilleryFire](../commands/doArtilleryFire.md) · [doSuppressiveFire](../commands/doSuppressiveFire.md) · [isManualFire](../commands/isManualFire.md)

## Community notes

**Bdfy** — 2007-01-20

true even if unit is out of ammo. Only false if gun is damaged.

---

**Canukausiuka** — 2008-08-24

False if there is no gunner in the vehicle, regardless of damage level.

---

**Pierre MGI** — 2018-04-23

This command seems to have evolved. Returns "true" (on Hunter, Ifrit) even if Gun's damage is set to 1 and turret also, as far there is a gunner. The only way to obtain a canFire  "false"  is to make the crew disembark (2 burned tires for example). Then no matter the gun state, if the gunner disembarks without order, the vehicle can't fire. In this case: can't move >> can't fire.
NB: if you jump into a hunter HMG after having [setHitPointDamage](../commands/setHitPointDamage.md)(d) "hitTurret" and "hitGun"  to 1, the turret can't rotate any more, the gun is pitched down but you can fire (trigger) to the ground. Difficult to check the behavior for each vehicles.

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