setEntityInvincible
SET_ENTITY_INVINCIBLE0x3882114BDE571AD4The 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.
setEntityInvincible(
entity: Entity,
toggle: boolean,
dontResetOnCleanup: boolean
): voidsetEntityInvincible(
entity: Entity,
toggle: boolean,
dontResetOnCleanup: boolean
)Usage
JavaScript
setEntityInvincible(entity, toggle, dontResetOnCleanup);Lua
setEntityInvincible(entity, toggle, dontResetOnCleanup)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
entity | Entity | number | integer |
toggle | BOOL | boolean | boolean |
dontResetOnCleanup | BOOL | boolean | boolean |
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