GetActorPoolSize
From SA-MP Wiki
Description:
Gets the highest actorid created on the server.
This function has no parameters.
Return Values:
The highest actorid created on the server or 0 if there are no created actors.
Example Usage:
SetAllActorsHealth(Float:health) { for(new i = 0, j = GetActorPoolSize(); i <= j; i++) { if(IsValidActor(i)) { SetActorHealth(i, health); } } }
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- CreateActor: Create an actor (static NPC).
- IsValidActor: Check if actor id is valid.
- SetActorHealth: Set the health of an actor.