---
name: "enableGunLights"
type: command
status: ok
groups: ["Lights", "Weapons"]
arma3_since: "0.50"
locality: {"argument": "local", "effect": "global", "server_exec": false}
source: https://community.bistudio.com/wiki/enableGunLights
revid: 351992
updated: 2024-02-01T23:23:57Z
---

# enableGunLights

*Command · Lights, Weapons · Arma 3 v0.50*

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

## Description

Toggles the target group's gun lights. [disableAI](../commands/disableAI.md) "LIGHTS" will disable the use of gun lights.

> [!IMPORTANT]
> This command acts on each unit of the provided group or provided unit's group; there is no need to apply it on each unit.

## Syntax

```sqf
target enableGunLights mode
```

**Parameters:**

- `target`: [Group](../topics/Group.md) or [Object](../topics/Object.md) - the group forced to use gun lights. If unit is supplied as argument, unit's group is used
- `mode`: [String](../topics/String.md) - can be:
  - `"Auto"` - Depends on combat mode
  - `"ForceOn"` - Always on
  - `"ForceOff"` - Always off

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

## Examples

### Example 1

```sqf
_groupA enableGunLights "Auto";
```

### Example 2

```sqf
_unit1 enableGunLights "ForceOff"; // sets _unit1's GROUP behaviour to not use gun lights
```

## See also

[isFlashlightOn](../commands/isFlashlightOn.md) · [enableIRLasers](../commands/enableIRLasers.md)

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