# ENTITY::SET_ENTITY_CAN_BE_DAMAGED_BY_RELATIONSHIP_GROUP

- **Hash:** `0x0EF1AFB18649E015`
- **Namespace:** ENTITY
- **Runtime name (Lua/JS):** `SetEntityCanBeDamagedByRelationshipGroup`
- **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_BY_RELATIONSHIP_GROUP

## Signature

```c
void SET_ENTITY_CAN_BE_DAMAGED_BY_RELATIONSHIP_GROUP(Entity entity, BOOL bCanBeDamaged, Hash relGroup);
```

## Parameters

- `entity` (`Entity`)
- `bCanBeDamaged` (`BOOL`)
- `relGroup` (`Hash`)

## Returns

`void`

## Usage

### Lua

```lua
SetEntityCanBeDamagedByRelationshipGroup(entity, bCanBeDamaged, relGroup)

-- always available, by hash
Citizen.InvokeNative(0x0EF1AFB18649E015, entity, bCanBeDamaged, relGroup)
```

### JavaScript

```js
SetEntityCanBeDamagedByRelationshipGroup(entity, bCanBeDamaged, relGroup);

// by hash
Citizen.invokeNative('0x0EF1AFB18649E015', entity, bCanBeDamaged, relGroup);
```

### C#

```csharp
Function.Call((Hash)0x0EF1AFB18649E015, entity, bCanBeDamaged, relGroup);
```

- Hash parameters: the named function also accepts a string and hashes it for you; `Citizen.InvokeNative` needs the number — pass `joaat("name")` or a backtick literal like `` `name` ``.

*Sources: alloc8or RDR3 NativeDB.*
