EntityClient

setEntityInvincible

SET_ENTITY_INVINCIBLE0x3882114BDE571AD4

The GTA V native SET_ENTITY_INVINCIBLE of the ENTITY namespace, as LS:MP client scripts call it: the global function setEntityInvincible, in JavaScript and in Lua.

SignatureJavaScript
setEntityInvincible(
  entity: Entity,
  toggle: boolean,
  dontResetOnCleanup: boolean
): void
SignatureLua
setEntityInvincible(
  entity: Entity,
  toggle: boolean,
  dontResetOnCleanup: boolean
)

Usage

JavaScript
setEntityInvincible(entity, toggle, dontResetOnCleanup);
Lua
setEntityInvincible(entity, toggle, dontResetOnCleanup)

Parameters

ParameterTypeJavaScriptLua
entityEntitynumberinteger
toggleBOOLbooleanboolean
dontResetOnCleanupBOOLbooleanboolean

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Sets a ped or an object totally invincible. It doesn't take any kind of damage. Peds will not ragdoll on explosions and the tazer animation won't apply either.

Reference

Namespace
Entity ENTITY
In the game
void SET_ENTITY_INVINCIBLE(Entity entity, BOOL toggle, BOOL dontResetOnCleanup)
Hash
0x3882114BDE571AD4

Open in the interactive natives reference