RedM Natives

SET_PLAYER_INVINCIBLE

Make the player impervious to all forms of damage.

Hash0xDFB9A2A2
Runtime nameSetPlayerInvincible
NamespaceCFX
SideServer
NameOfficial
Docs

Signature

void SET_PLAYER_INVINCIBLE(Player player, BOOL bInvincible);

Parameters

NameTypeDescription
playerPlayer

The player index.

bInvincibleBOOL—

Returns void

Description

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.

Usage

Lua
SetPlayerInvincible(player, bInvincible)

-- always works, by hash
Citizen.InvokeNative(0xdfb9a2a2, player, bInvincible)
JavaScript and C#
JavaScript
SetPlayerInvincible(player, bInvincible);

// by hash
Citizen.invokeNative('0xdfb9a2a2', player, bInvincible);
C#
Function.Call((Hash)0xdfb9a2a2, player, bInvincible);

See also

Sources

Cfx.re native reference

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.