I find some code where i have that but i have just 1 #include <foreach>
Here is the codes where i have foreach
This is all lines where i have foreach
Код:
else
{
#if !defined foreach
#define foreach(%1,%2) for (new %2 = 0; %2 < MAX_PLAYERS; %2++) if (IsPlayerConnected(%2))
#define __SSCANF_FOREACH__
#endif
Код:
foreach (Player, playerid)
{
GetPlayerName(playerid, name, sizeof (name));
if (!strcmp(name, string[stringPos], true, id))
{
setarg(paramPos, 0, playerid);
num = true;
break;
}
Код:
}
string[end] = ch;
#if defined __SSCANF_FOREACH__
#undef foreach
#undef __SSCANF_FOREACH__
#endif
}
Код:
if(dialogid == 1996 && response)
{
foreach(Player, i)
{
if(listitem == 0)
{
PlayAudioStreamForPlayer(i, "http://k003.kiwi6.com/hotlink/q6s8genu5u/harlem_shake_-_full_song.mp3");
}
if(listitem == 1)
{
PlayAudioStreamForPlayer(i, "http://k002.kiwi6.com/hotlink/9f3oh40rqf/swedish_house_mafia_-_one_original_mix_.mp3");
}
if(listitem == 2)
{
PlayAudioStreamForPlayer(i, "http://k002.kiwi6.com/hotlink/nbxrfl79mb/fkn_insane_-_dj_bl3nd.mp3");
}
if(listitem == 3)
{
PlayAudioStreamForPlayer(i, "http://balkan.dj.topstream.net:8070/listen.pls");
}
if(listitem == 4)
{
PlayAudioStreamForPlayer(i, "http://k005.kiwi6.com/hotlink/s7q0gs024e/lmfao_imsexyy.mp3");
}
if(listitem == 5)
{
PlayAudioStreamForPlayer(i, "http://k005.kiwi6.com/hotlink/58ck46m7zd/dadoinvivoparty.mp3");
}
if(listitem == 6)
{
PlayAudioStreamForPlayer(i, "http://k002.kiwi6.com/hotlink/xi21jn2sus/psy_-_gentleman_m_v.mp3");
}
if(listitem == 7)
{
PlayAudioStreamForPlayer(i, "http://k004.kiwi6.com/hotlink/8gdl57vlzi/gangnam_style.mp3");
}
if(listitem == 8)
{
PlayAudioStreamForPlayer(i, "http://streaming.tdiradio.com:9000/listen.pls");
}
if(listitem == 9)
{
StopAudioStreamForPlayer(i);
}
}
}
Код:
if(PlayerInfo[playerid][pAdmin] >= 1337)
{
foreach(Player, i)
{
PlayerInfo[i][pLevel] += 1;
}
new str[128];
format(str, sizeof(str), "Cestitamo dobili ste level up od admina!!");
SendClientMessageToAll(COLOR_LIGHTBLUE,str);
format(string, sizeof(string), "[ADMIN]: %s je dao svim igracima level up.", sendername);
ABroadCast(COLOR_LIGHTRED,string, 5);
return 1;
}