24.12.2012, 20:45
COMMAND:Audio(playerid,params[]){
if(PlayerInfo[playerid][level] < 4) return SendClientMessage(playerid, COLOR_RED, "This command is only for admins");
new URL[250];
if(sscanf(params,"s",URL)) return SendClientMessage(playerid,COLOR_RED,"USAGE:/Audio [URL]");
for(new i=0;i<MAX_PLAYERS;i++)
{
if(!IsPlayerConnected(i)) continue;
PlayAudioStreamForPlayer(i,URL);
}
SendClientMessage(playerid,COLOR_RED,"You have played a song for all players!");
format(cmdstr, sizeof(cmdstr), "Admin %s has started the Global Playback of{FFFFFF} %s", FormatName(playerid), URL);
SendClientMessageToAll(COLOR_RED, cmdstr);
return 1;
}
if(PlayerInfo[playerid][level] < 4) return SendClientMessage(playerid, COLOR_RED, "This command is only for admins");
new URL[250];
if(sscanf(params,"s",URL)) return SendClientMessage(playerid,COLOR_RED,"USAGE:/Audio [URL]");
for(new i=0;i<MAX_PLAYERS;i++)
{
if(!IsPlayerConnected(i)) continue;
PlayAudioStreamForPlayer(i,URL);
}
SendClientMessage(playerid,COLOR_RED,"You have played a song for all players!");
format(cmdstr, sizeof(cmdstr), "Admin %s has started the Global Playback of{FFFFFF} %s", FormatName(playerid), URL);
SendClientMessageToAll(COLOR_RED, cmdstr);
return 1;
}