22.04.2012, 22:55
Код:
CMD:radio(playerid, params[])
{
new string[128], url[126];
new id = strval(params[0]);
if(playerVariables[playerid][pAdminLevel] >= 3)
{
switch(id) {
case 1: format(url, sizeof(url), "http://www.symphonyofnoise.com/binv2/ListenRap/06.Tupac-HailMairy.mp3");
default: return 1;
}
for(new i = 0; i < MAX_PLAYERS; i++) {
PlayAudioStreamForPlayer(i, url);
}
GetPlayerName(playerid, szPlayerName, MAX_PLAYER_NAME);
format(string, sizeof(string), "Music Admin: %s has started the Song Tupac - Hail mary", szPlayerName);
SendClientMessageToAll(COLOR_LIGHTRED, string);
}
return 1;
}
You may also want to make it so that if someone just types /radio in, or an invalid radio number, it shows a list of the songs.

