24.06.2013, 10:24
try this
Код:
if(!strcmp(cmdtext, "/playall", true))
{
new url[32];
if(PlayerInfo[playerid][pDJ] != 1) return SendClientMessage(playerid, COLOR_WHITE, "DJ Only Command");
else if(!strlen(url) || strlen(url) > 32) return SendClientMessage(playerid, -1, "USAGE: /playall [url]");
else
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayAudioStreamForPlayer(i, url);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can stop playing this song with /stopall");
SendClientMessage(i, COLOR_LIGHTBLUE, "An DJ has started playing a song (use /stopaudio to stop this song for you");
}
}
return 1;
}
