I have a loop problem..
#1

Can anyone make a loop that keeps going if i == playerid?
I tried something like this
Код:
for(new i = 0; i < MAX_PLAYERS; i++)
		{
		    if(i == playerid; < MAX_PLAYERS) return i++;
Reply
#2

When you're saying "that keeps going", do you mean to skip it if i is equal to playerid?
If so:
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
    if(!IsPlayerConnected(i) || i == playerid) continue;
    // code;
}
By the way, skip the offlines players.
Reply
#3

THANK YOU SO MUCH you saved my day +REP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)