---
name: "removeWeaponGlobal"
type: command
status: ok
groups: ["Unit Inventory", "Vehicle Inventory"]
arma3_since: "0.76"
locality: {"argument": "global", "effect": "global", "server_exec": false}
source: https://community.bistudio.com/wiki/removeWeaponGlobal
revid: 373147
updated: 2025-04-04T06:15:31Z
---

# removeWeaponGlobal

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

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

## Description

Remove a weapon from a unit. An attempt to remove a weapon, which is not in unit's possession, is simply ignored.

## Syntax

### Syntax 1

```sqf
unit removeWeaponGlobal weapon
```

**Parameters:**

- `unit`: [Object](../topics/Object.md) - unit or vehicle
- `weapon`: [String](../topics/String.md) - weapon class name

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

### Syntax 2

*since arma3 2.20*

```sqf
object removeWeaponGlobal [weapon, autoselect]
```

**Parameters:**

- `object`: [Object](../topics/Object.md) - unit or vehicle
- `weapon`: [String](../topics/String.md) - weapon class name
- `autoselect`: [String](../topics/String.md) - (Optional, default [true](../commands/true.md)) [false](../commands/false.md) to abort weapon autoselection when removing primary weapon.

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

## Examples

### Example 1

```sqf
{
    _x removeWeaponGlobal "Laserdesignator";
} forEach allUnits;
```

### Example 2

```sqf
{
    if (typeOf _x == "O_Heli_Attack_02_black_F") then {
        _x removeWeaponGlobal "rockets_Skyfire";
    };
} forEach vehicles;
```

## See also

[addWeaponGlobal](../commands/addWeaponGlobal.md) · [removeWeapon](../commands/removeWeapon.md) · [removeMagazine](../commands/removeMagazine.md) · [removeMagazineGlobal](../commands/removeMagazineGlobal.md) · [removeAllWeapons](../commands/removeAllWeapons.md)

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