---
name: "setVehicleAmmo"
type: command
status: ok
groups: ["Vehicle Inventory"]
arma3_since: "0.50"
locality: {"argument": "local", "effect": "global", "server_exec": false}
source: https://community.bistudio.com/wiki/setVehicleAmmo
revid: 376973
updated: 2026-01-01T06:03:41Z
---

# setVehicleAmmo

*Command · Vehicle Inventory · Arma 3 v0.50 · introduced in Armed Assault v1.00*

Locality: arguments **local** · effect **global**

## Description

Sets how much ammunition (compared to a full state defined by the vehicle type) the vehicle has. Note that the ammo will be added only to [local](../topics/Multiplayer_Scripting.md#locality) turrets. To check locality of turret use [turretLocal](../commands/turretLocal.md).

## Syntax

```sqf
vehicleName setVehicleAmmo value
```

**Parameters:**

- `vehicleName`: [Object](../topics/Object.md)
- `value`: [Number](../topics/Number.md) in range 0..1 - 0: empty, 1: full

**Returns:** [Nothing](../topics/Nothing.md)

## Examples

### Example 1

```sqf
player setVehicleAmmo 0;
```

### Example 2

```sqf
_vehicle setVehicleAmmo 1;
```

## See also

[setVehicleAmmoDef](../commands/setVehicleAmmoDef.md) · [ammo](../commands/ammo.md) · [setAmmo](../commands/setAmmo.md) · [setAmmoCargo](../commands/setAmmoCargo.md) · [turretLocal](../commands/turretLocal.md)

## Community notes

**Ceeeb**

This command does not add magazines to vehicle weapons that normally start with more than one magazine. It can however, remove these magazines.

---

**Bon_Inf***

A2:OA v1.59 - Magazines of vehicle turrets are also refilled by this command.

---

**.kju**

- If you 'unit/vehicle setVehicleAmmo 0;' an unit/vehicle first, you cannot refill it with 'unit/vehicle setVehicleAmmo 1;'.
- You need to execute where the unit is [local](../topics/Multiplayer_Scripting.md#locality).
- You need to execute on the [effectiveCommander](../commands/effectiveCommander.md) of a vehicle.

---

**Galzohar**

- In Arma 3, using this command seems correctly rearm the vehicle and its turrets in all situations (tested with beta 0.72).

---

**Killzone_Kid**

- In Arma 3, when using this on a player, this command can only reduce the number of magazine in relation to the current ammo quantity of the unit. For example if player has 8 magazines, [player](../commands/player.md) [setVehicleAmmo](../commands/setVehicleAmmo.md) 0.5; will leave unit with 4 mags. Executing [player](../commands/player.md) [setVehicleAmmo](../commands/setVehicleAmmo.md) 0.5; again will leave unit with 2 mags. [player](../commands/player.md) [setVehicleAmmo](../commands/setVehicleAmmo.md) 0.5; again -> 1 mag. [player](../commands/player.md) [setVehicleAmmo](../commands/setVehicleAmmo.md) 0; will remove all mags. If player had 10 mags with 30 bullets in each, [player](../commands/player.md) [setVehicleAmmo](../commands/setVehicleAmmo.md) 0.01; will leave player with loaded mag with 3 bullets in it (300 x 0.01 = 3)

---

**Actium** — 2014-12-20

This command does not operate *compared to a full state defined by the vehicle type*, but rather relative to a vehicle's current magazine loadout. To get the former behaviour use [setVehicleAmmoDef](../commands/setVehicleAmmoDef.md), which utilizes the vehicles default magazine loadout (i.e. its CfgVehicles magazines[] values).

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