---
name: "BIS_fnc_unitHeadgear"
type: function
status: ok
groups: ["Inventory"]
arma3_since: "1.48"
locality: {"argument": "local", "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_unitHeadgear
revid: 336872
updated: 2023-01-04T16:43:48Z
---

# BIS_fnc_unitHeadgear

*Function · Inventory · Arma 3 v1.48*

Locality: arguments **local**

## Description

Randomise headgear and facewear of a character.

> [!IMPORTANT]
> If the randomization is disabled, only strings parameters will be processed, array will be ignored and considered as false.

## Syntax

```sqf
[unit, headgear, facewear] call BIS_fnc_unitHeadgear
```

**Parameters:**

- `unit`: [Object](../topics/Object.md)
- `headgear`: [Boolean](../topics/Boolean.md), [String](../topics/String.md) or [Array](../topics/Array.md) - (Optional, default [false](../commands/false.md)) can be one of:
  - [Boolean](../topics/Boolean.md) - if [false](../commands/false.md), change nothing to the headgear
  - [String](../topics/String.md) - valid Headgear class or a valid class from [Description.ext CfgUnitTemplates](../topics/Description.ext.md#cfgunittemplates)
  - [Array](../topics/Array.md) - headgear list with individual probability
- `facewear`: [Boolean](../topics/Boolean.md), [String](../topics/String.md) or [Array](../topics/Array.md) - (Optional, default [false](../commands/false.md)) can be one of:
  - [Boolean](../topics/Boolean.md) - if [false](../commands/false.md), change nothing to the facewear
  - [String](../topics/String.md) - valid facewear class or a valid class from [Description.ext CfgUnitTemplates](../topics/Description.ext.md#cfgunittemplates)
  - [Array](../topics/Array.md) - facewear list with individual probability

**Returns:** [Boolean](../topics/Boolean.md) - [true](../commands/true.md) when done

## Examples

### Example 1

```sqf
[this] call BIS_fnc_unitHeadgear;                    // headgear and face wear, same as [this, [], []]
[this, [], []] call BIS_fnc_unitHeadgear;            // headgear only
[this, nil, []] call BIS_fnc_unitHeadgear;            // facewear only
[this, "myTemplate"] call BIS_fnc_unitHeadgear;    // class defined in Description.ext - CfgUnitTemplates
```

## See also

[addGoggles](../commands/addGoggles.md) · [addHeadgear](../commands/addHeadgear.md)

<sub>Source: [BI Community Wiki — BIS fnc unitHeadgear](https://community.bistudio.com/wiki/BIS_fnc_unitHeadgear) (revision 336872).</sub>
