setPlayerInvincible
SET_PLAYER_INVINCIBLE0x239528EACDC3E7DEThe GTA V native SET_PLAYER_INVINCIBLE of the PLAYER namespace, as LS:MP client scripts call it: the global function setPlayerInvincible, in JavaScript and in Lua.
setPlayerInvincible(player: Player, toggle: boolean): voidsetPlayerInvincible(player: Player, toggle: boolean)Usage
JavaScript
setPlayerInvincible(player, toggle);Lua
setPlayerInvincible(player, toggle)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
player | Player | number | integer |
toggle | 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.
Simply sets you as invincible (Health will not deplete).
Reference
- Namespace
- Player PLAYER
- In the game
void SET_PLAYER_INVINCIBLE(Player player, BOOL toggle)- Hash
0x239528EACDC3E7DE