Help with for foreach
#2

pawn Код:
if (strcmp("/harlemshake", cmdtext, true) == 0)
    {
      foreach(Player, i)
      {

        if(PlayerInfo[i][pAdmin] >= 1)
        {
                PlayAudioStreamForPlayer(i, "http://k003.kiwi6.com/hotlink/q6s8genu5u/harlem_shake_-_full_song.mp3");
        }
        else
        {
            SendClientMessage(playerid, COLOR_ASKQ, "Niste ovlasceni da koristite ovu komandu");
            return 1;
        }
      }
    }
or
pawn Код:
if (strcmp("/harlemshake", cmdtext, true) == 0)
    {
      for(new i=0; i<MAX_PLAYERS; i++)
      {

        if(PlayerInfo[i][pAdmin] >= 1)
        {
                PlayAudioStreamForPlayer(i, "http://k003.kiwi6.com/hotlink/q6s8genu5u/harlem_shake_-_full_song.mp3");
        }
        else
        {
            SendClientMessage(playerid, COLOR_ASKQ, "Niste ovlasceni da koristite ovu komandu");
            return 1;
        }
      }
    }
Reply


Messages In This Thread
Help with for foreach - by superaconi - 31.05.2013, 10:41
Re: Help with for foreach - by IceBilizard - 31.05.2013, 10:50
Re: Help with for foreach - by superaconi - 31.05.2013, 10:59

Forum Jump:


Users browsing this thread: 1 Guest(s)