---
name: "setVehicleAmmoDef"
type: command
status: ok
groups: ["Unit Inventory", "Vehicle Inventory"]
arma3_since: "0.50"
locality: {"argument": "local", "effect": "global", "server_exec": false}
source: https://community.bistudio.com/wiki/setVehicleAmmoDef
revid: 378138
updated: 2026-02-25T12:58:23Z
---

# setVehicleAmmoDef

*Command · Unit Inventory, Vehicle Inventory · Arma 3 v0.50*

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

## Description

Sets how much ammunition (compared to the configuration of magazines defined in the vehicle's class) the vehicle has. Note that the ammo will only be added to [local](../topics/Multiplayer_Scripting.md#locality) turrets. To check the locality of turret use [turretLocal](../commands/turretLocal.md).

## Syntax

```sqf
unit setVehicleAmmoDef value
```

**Parameters:**

- `unit`: [Object](../topics/Object.md) - unit or vehicle.
- `value`: [Number](../topics/Number.md) - from 0 (no ammo) to 1 (fully loaded).

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

## Examples

### Example 1

```sqf
player setVehicleAmmoDef 0;
```

## See also

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

## Community notes

**Actium** — 2014-12-20

For vehicles this command operates relative to its stock magazine loadout (i.e. its CfgVehicles magazines[] values).
Thus *setVehicleAmmoDef 1* will fully restore a vehicle to its default ammunition capacity, resetting any changes made by intentionally/implicitly adding/removing magazines.
Use [setVehicleAmmo](../commands/setVehicleAmmo.md) to operate in relation to a vehicle's current magazine loadout.

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