Question about a loop
#1

I was wondering if you needed to substitute 'playerid' with "i" in this particular case for every use:

PHP код:
        for(new 0!= MAX_PLAYERS; ++i)
        {
            if(
IsPlayerConnected(i))
            {
                if(
PlayerInfo[playerid][pSongPlaying] == 1)
                {
                    
Stop*******VideoForPlayer(playerid); // so this becomes Stop*******VideoForPlayer(i); or does it stay how it is?
                    
PlayerInfo[playerid][pSongPlaying] = 0;
                    
Play*******VideoForPlayer(i,ylink);
                       
PlayerInfo[playerid][aSongPlaying] = 1;
                }
            }
        } 
Reply
#2

Hi,

Yes you have to use "i" instead of "playerid".
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)