Question about foreach
#1

Can I use this ?

pawn Код:
foreach(Player, i)
{
    if(IsPlayerConnected(i))
    {
    //code
    }
}
I need to use IsPlayerConnected?

And foreach is more fast of for(new i = 0; i < MAX_PLAYERS, ++i) ?
Reply
#2

U dont need IsPlayerConnected and its faster than MAX_PLAYERS because that keeps online ids without checking IsPlayerConnected
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)