08.06.2014, 19:40
Sorry, I thought it somehow differently so it's my mistake. Yes, in that case the loop will be called 3 times but in case the array's indexes are full (Let's say MAX_PLAYERS is 10 and the array stores all the players), it will be caused a run time error 4. In that case, checking if i is less than MAX_PLAYERS first is the solution:
pawn Код:
while (++i < MAX_PLAYERS && cmdplayers[i] != -1)