SetActorInvulnerable
From SA-MP Wiki
Description:
Toggle an actor's invulnerability.
(actorid, invulnerable = true)
actorid | The ID of the actor to set invulnerability. |
invulnerable | 0 to make them vulnerable, 1 to make them invulnerable. |
Return Values:
- 1 - Success
- 0 - Failure (i.e. Actor is not created).
Important |
|
Example Usage:
new MyActor; public OnGameModeInit() { MyActor = CreateActor(179, 316.1, -134.0, 999.6, 90.0); // Actor as a salesperson in Ammunation. SetActorInvulnerable(MyActor, true); return 1; }
- CreateActor: Create an actor (static NPC).
- IsActorInvulnerable: Check if actor is invulnerable.
- SetActorHealth: Set the health of an actor.