---
name: "setPylonLoadout"
type: command
status: ok
groups: ["Vehicle Loadouts"]
arma3_since: "1.70"
locality: {"argument": "local", "effect": "local", "server_exec": false}
source: https://community.bistudio.com/wiki/setPylonLoadout
revid: 378820
updated: 2026-07-01T10:02:12Z
---

# setPylonLoadout

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

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

## Description

Adds/overrides loadout to a vehicle pylon. `TransportPylonsComponent` in vehicle config and `pylonWeapon` in the magazine config are required to run.

> [!NOTE]
> This command also adds the corresponding weapon if the vehicle does not have one, but will not remove one that is no longer used.

## Syntax

```sqf
vehicle setPylonLoadout [pylon, magazine, forced, turret]
```

**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 [#Example 1](../commands/setPylonLoadout.md#example-1))
- `magazine`: [String](../topics/String.md) - magazine name
- `forced`: [Boolean](../topics/Boolean.md) - (Optional, default [false](../commands/false.md)) [true](../commands/true.md) to force an incompatible magazine
- `turret`: Turret Path - (Optional, default `[]`) turret path

**Returns:** [Boolean](../topics/Boolean.md) - [true](../commands/true.md) on success

## Examples

### Example 1

```sqf
vehicle player setPylonLoadout ["pylon1", ""];
```

### Example 2

Make all of your pylon weapons Twin Cannon 30 mm:

```sqf
private _vehicle = vehicle player;
private _pylonsIndices = getAllPylonsInfo _vehicle apply { _x select 0 };
{
    _vehicle setPylonLoadout [_x, "PylonWeapon_300Rnd_20mm_shells", true];
} forEach _pylonsIndices;
```

### Example 3

Showcase all possible magazines:

```sqf
0 spawn {
    private _allPylonMagazines = "getText (_x >> 'pylonWeapon') != ''" configClasses (configFile >> "CfgMagazines");
    private _vehicle = vehicle player;
    private _pylonsIndices = getAllPylonsInfo _vehicle apply { _x select 0 };

    {
        private _configName = configName _x;
        {
            _vehicle setPylonLoadout [_x, _configName, true];
        } forEach _pylonsIndices;

        hint _configName;
        sleep 1.5;
    } forEach _allPylonMagazines;
};
```

### Example 4

MP compatible usage:

```sqf
[myPlane, [1, "PylonWeapon_300Rnd_20mm_shells", true]] remoteExec ["setPylonLoadout", myPlane];
```

## Multiplayer

> [!IMPORTANT]
> This command should run locally to the vehicle itself or it will cause desync issue! (especially upon the locality change, e.g getting in the vehicle).
> See [#Example 4](../commands/setPylonLoadout.md#example-4) for an MP-compatible usage.

## See also

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

## Community notes

**POLPOX** — 2020-04-30

**Before Arma 3 v2.02:** *turret* must be `[]` if you wanted to equip the magazine to the pilot. `[-1]` returns false and fails unlike other turret-related commands.

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