---
name: "attackEnabled"
type: command
status: ok
groups: ["Groups", "Unit Control"]
arma3_since: "0.50"
locality: {"argument": "global", "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/attackEnabled
revid: 321158
updated: 2022-05-13T15:07:49Z
---

# attackEnabled

*Command · Groups, Unit Control · Arma 3 v0.50 · introduced in Operation Flashpoint: Elite v1.00*

Locality: arguments **global**

## Description

Return whether a group's leader can issue attack commands to soldiers under his command.

## Syntax

```sqf
attackEnabled name
```

**Parameters:**

- `name`: [Object](../topics/Object.md) or [Group](../topics/Group.md)

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

## Examples

### Example 1

```sqf
if (not attackEnabled _soldier) then { _soldier setCombatMode "Careless" };
```

## See also

[enableAttack](../commands/enableAttack.md)

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