# CFX::SET_PLAYER_INVINCIBLE

- **Hash:** `0xDFB9A2A2`
- **Namespace:** CFX
- **Runtime name (Lua/JS):** `SetPlayerInvincible`
- **Side:** server (Cfx runtime native)
- **Name status:** official
- **Documentation:** described
- **URL:** https://natives.borderlinerp.com/natives/CFX/SET_PLAYER_INVINCIBLE

## Signature

```c
void SET_PLAYER_INVINCIBLE(Player player, BOOL bInvincible);
```

## Parameters

- `player` (`Player`) — The player index.
- `bInvincible` (`BOOL`)

## Returns

`void`

## Description

*Source: Cfx.re native reference*

Make the player impervious to all forms of damage.

**This is the server-side RPC native equivalent of the client native [SET_PLAYER_INVINCIBLE](?\_0x239528EACDC3E7DE).**

## Usage

### Lua

```lua
SetPlayerInvincible(player, bInvincible)

-- always available, by hash
Citizen.InvokeNative(0xdfb9a2a2, player, bInvincible)
```

### JavaScript

```js
SetPlayerInvincible(player, bInvincible);

// by hash
Citizen.invokeNative('0xdfb9a2a2', player, bInvincible);
```

### C#

```csharp
Function.Call((Hash)0xdfb9a2a2, player, bInvincible);
```

## See also

- [CFX::GET_PLAYER_INVINCIBLE](https://natives.borderlinerp.com/natives/CFX/GET_PLAYER_INVINCIBLE.md)

*Sources: Cfx.re native reference.*
