---
name: "setAmmoOnPylon"
type: command
status: ok
groups: ["Vehicle Loadouts"]
arma3_since: "1.70"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/setAmmoOnPylon
revid: 310926
updated: 2022-05-07T20:47:37Z
---

# setAmmoOnPylon

*Command · Vehicle Loadouts · Arma 3 v1.70*

## Description

Set count of ammo in magazine on pylon (supports pylon name since Arma 3 v1.94)

## Syntax

```sqf
vehicle setAmmoOnPylon [pylon, ammocount]
```

**Parameters:**

- `vehicle`: [Object](../topics/Object.md)
- `pylon`: [Number](../topics/Number.md) or [String](../topics/String.md) - pylon index (index starts from 1) or pylon name (see [getCompatiblePylonMagazines](../commands/getCompatiblePylonMagazines.md) Example 4)
- `ammocount`: [Number](../topics/Number.md) - ammo count

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

## Examples

### Example 1

```sqf
vehicle player setAmmoOnPylon [1, 12];
```

### Example 2

```sqf
vehicle player setAmmoOnPylon ["pylon1", 12];
```

## See also

Arma 3: Vehicle Loadouts · [getCompatiblePylonMagazines](../commands/getCompatiblePylonMagazines.md) · [getPylonMagazines](../commands/getPylonMagazines.md) · [animatePylon](../commands/animatePylon.md) · [animateBay](../commands/animateBay.md) · [setPylonsPriority](../commands/setPylonsPriority.md) · [setPylonLoadout](../commands/setPylonLoadout.md) · [setMagazineTurretAmmo](../commands/setMagazineTurretAmmo.md)

## Community notes

**Commy2** — 2017-08-18

The pylon indices start at 1 and not at 0.

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