SA-MP Forums Archive
Looping :/ - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Looping :/ (/showthread.php?tid=248312)



Looping :/ - Lorenc_ - 13.04.2011

Well yer i need a loop that could loop through completely all NPC's created, i'm using CNPC although not using the features that are against the SA-MP TOS. Just creating some NPC's around and preventing from so many timers.

I clearly forgot how to do this method :/


Re: Looping :/ - (SF)Noobanatior - 13.04.2011

pawn Code:
for(new i=0;i<MAX_PLAYERS;i++){
if(!IsPlayerConnected(i))continue;
if(IsPlayerNPC(i)){
//do stuff
}
}
? that what ya after?


Re: Looping :/ - Lorenc_ - 13.04.2011

yup maddawg thanks