note Help Needed
This wiki is the result of an ongoing community effort — thank you all for helping!
If you want to provide changes to this page then please click here.
GetActorPoolSize
warning
This function was added in SA-MP 0.3.7 and will not work in earlier versions!
Deskripcija
Dobij najviši actorid kreiran na serveru. Imajte na umu da je u SA:MP-u ova funkcija pokvarena i da će returnati 0
čak i kada nema actora. fixes.inc i open.mp ispravljaju ovo te returnaju (vraćaju) -1
, ali također odbijaju funkciju u korist MAX_ACTORS
ili foreach
plugina.
Primjeri
SetAllActorsHealth(Float:health)
{
for(new i = 0, j = GetActorPoolSize(); i <= j; i++)
{
if (IsValidActor(i))
{
SetActorHealth(i, health);
}
}
}
Srodne Funkcije
- CreateActor: Kreiraj actora (statički NPC).
- IsValidActor: Provjerite da li je ID actora validan.
- SetActorHealth: Postavite health actoru.