GetActorPoolSize

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 19:09, 31 December 2016
OstGot (Talk | contribs)

← Previous diff
Current revision
OstGot (Talk | contribs)

Line 5: Line 5:
{{NoParam}} {{NoParam}}
-{{Returns|The highest actorid created on the server.}}+{{Returns|The highest actorid created on the server or '''0''' if there are no created actors.}}
{{Example}} {{Example}}

Current revision


GetActorPoolSize was added in SA-MP 0.3.7 This function was added in SA-MP 0.3.7 and will not work in earlier versions!


Description:

Gets the highest actorid created on the server.


Parameters:
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.

Personal tools
In other languages