30.09.2013, 20:39
Try this
Your Mistakes
Both of them are loop, they work the same, you don't need two! you just need one.
String is a string, obviously the music won't play, string and params works different
pawn Код:
CMD:astream(playerid, params[])
{
if(gPlayerInfo[playerid][pAdmin] < 4) return SendClientMessage(playerid, -1, "SERVER: You are not allowed to use this command");
{
if(isnull(params)) return SendClientMessage(playerid, -1, "{878787}USAGE: /music [mp3 link]");
{
foreach(Player, i)
{
PlayAudioStreamForPlayer(i, params);
}
}
new string[128];
format(string, sizeof(string), "SERVER: Administrator %s has played a music", GetName(playerid));
SendClientMessageToAll(COL_ORANGE, string);
}
return 1;
}
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
// and //
foreach(Player, i)
pawn Код:
PlayAudioStreamForPlayer(i, string);
// should be //
PlayAudioStreamForPlayer(i, params);