# ENTITY::SET_ENTITY_CAN_BE_DAMAGED

- **Hash:** `0x0D06D522B90E861F`
- **Namespace:** ENTITY
- **Runtime name (Lua/JS):** `SetEntityCanBeDamaged`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** named only
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/ENTITY/SET_ENTITY_CAN_BE_DAMAGED

## Signature

```c
void SET_ENTITY_CAN_BE_DAMAGED(Entity entity, BOOL toggle);
```

## Parameters

- `entity` (`Entity`)
- `toggle` (`BOOL`)

## Returns

`void`

## Usage

### Lua

```lua
SetEntityCanBeDamaged(entity, toggle)

-- always available, by hash
Citizen.InvokeNative(0x0D06D522B90E861F, entity, toggle)
```

### JavaScript

```js
SetEntityCanBeDamaged(entity, toggle);

// by hash
Citizen.invokeNative('0x0D06D522B90E861F', entity, toggle);
```

### C#

```csharp
Function.Call((Hash)0x0D06D522B90E861F, entity, toggle);
```

## See also

- [ENTITY::_GET_ENTITY_CAN_BE_DAMAGED](https://natives.borderlinerp.com/natives/ENTITY/_GET_ENTITY_CAN_BE_DAMAGED.md) — Old name: _GET_ENTITY_CAN_BE_DAMAGED

*Sources: alloc8or RDR3 NativeDB.*
