Changing normal loop with foreach
#1

Hi, i've just switched to foreach since it has a more efficient loop, but i can't convert this loop to a foreach loop

pawn Код:
for(new i = 0; i < sizeof (IsPlayerCapturing[]); ++i)
    {
        if(IsPlayerCapturing[playerid][i] == true)
        {
            LeavingZONE(playerid, i);
            SendClientMessage(killerid, COLOR_PINK, "[NOTICE]: You have prevented the ennemy from capturing this zone, +1XP!");
            SetPlayerScore(killerid, GetPlayerScore(killerid) +1);
            IsPlayerCapturing[playerid][i] = false;
        }
    }
Reply


Messages In This Thread
Changing normal loop with foreach - by Battlezone - 15.06.2014, 10:59
Re: Changing normal loop with foreach - by Konstantinos - 15.06.2014, 11:08
Re: Changing normal loop with foreach - by Battlezone - 15.06.2014, 11:26

Forum Jump:


Users browsing this thread: 1 Guest(s)