---
name: "handgunWeapon"
type: command
status: ok
groups: ["Unit Inventory"]
arma3_since: "0.50"
locality: {"argument": "global", "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/handgunWeapon
revid: 320951
updated: 2022-05-13T10:04:47Z
---

# handgunWeapon

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

Locality: arguments **global**

## Description

Returns the name of a unit's handgun (an empty string if there is none).

## Syntax

```sqf
handgunWeapon unit
```

**Parameters:**

- `unit`: [Object](../topics/Object.md)

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

## Examples

### Example 1

```sqf
hint handgunWeapon player; //"hgun_P07_F"
```

## See also

[handgunMagazine](../commands/handgunMagazine.md) · [handgunItems](../commands/handgunItems.md) · [addHandgunItem](../commands/addHandgunItem.md) · [removeHandgunItem](../commands/removeHandgunItem.md) · [removeAllHandgunItems](../commands/removeAllHandgunItems.md) · [primaryWeapon](../commands/primaryWeapon.md) · [secondaryWeapon](../commands/secondaryWeapon.md) · [currentWeapon](../commands/currentWeapon.md) · [weapons](../commands/weapons.md)

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