---
name: "allowDamage"
type: command
status: ok
groups: ["Object Manipulation"]
arma3_since: "0.50"
locality: {"argument": "local", "effect": "global", "server_exec": false}
source: https://community.bistudio.com/wiki/allowDamage
revid: 378125
updated: 2026-02-21T14:29:34Z
---

# allowDamage

*Command · Object Manipulation · Arma 3 v0.50 · introduced in Arma 2 v1.00*

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

Alias: [allowDammage](../commands/allowDammage.md)

## Description

Enables / disables an entity's ability to receive damage.
This command does not prevent the entity from taking scripted damage from commands such as [setDamage](../commands/setDamage.md), [setHit](../commands/setHit.md), [setHitIndex](../commands/setHitIndex.md) or [setHitPointDamage](../commands/setHitPointDamage.md).

> [!NOTE]
> This command only supports entities (`Entity` is a child class of `Object`, i.e. all entities are objects, but not all objects are entities).
> Consequently, there are objects that are not affected by this command, for example terrain vegetation such as trees.

## Syntax

```sqf
entity allowDamage allow
```

**Parameters:**

- `entity`: [Object](../topics/Object.md)
- `allow`: [Boolean](../topics/Boolean.md)

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

## Examples

### Example 1

```sqf
player allowDamage false;
```

## Multiplayer

> [!IMPORTANT]
> This command has to be executed where the object is [local](../topics/Multiplayer_Scripting.md#locality).
> Its effect will only last as long as the object does not change locality.
> If the object changes locality, the command needs to be executed again on the new [owner](../commands/owner.md)'s machine to maintain the effect.

## See also

[isDamageAllowed](../commands/isDamageAllowed.md) · [setDamage](../commands/setDamage.md) · [setHit](../commands/setHit.md) · [setHitIndex](../commands/setHitIndex.md) · [setHitPointDamage](../commands/setHitPointDamage.md) · [damage](../commands/damage.md)

## Community notes

**AgentRev01** — 2013-09-02

```sqf
_object allowDamage false;
```

has the same effect as

```sqf
_object addEventHandler ["HandleDamage", { 0 }];
```

**except for buildings that are native to the map**; for those, the effects of HandleDamage will not sync properly across all clients, even if added to the building on every client and the server.

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