Umm, well I have created a /music system - which will show the ADMIN a list of songs available (you can edit it yourself)
he just selects one....everyone hears the song (EXTRA: people can /stopmusic, at any time so)
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch( dialogid )
{
case DIALOG_AMUSIC:
{
if(!response) return SendClientMessage(playerid, COLOR_WHITE, "You have decided to cancel");
if(response)
{
switch(listitem)
{
case 0:
{
for(new i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i))
{
PlayAudioStreamForPlayer(i, "http://5d.media.v4.skyrock.net/music/5db/ff5/5dbff507ffe37a96130d00b4b25b998d.mp3", 0.0, 0.0, 0.0, 50.0, 0);
new str[128], aName[MAX_PLAYER_NAME], aLVL[MAX_PLAYERS];
GetAdminLvlName(playerid);
GetPlayerName(playerid, aName, sizeof(aName));
format(str, sizeof(str), "** %s %s has just turned on the song: Champagne Showers, L.M.F.A.O", aLVL, aName);
SendClientMessageToAll(COLOR_YELLOW, str);
}
}
case 1:
{
for(new i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i))
{
PlayAudioStreamForPlayer(i, "http://dl.soundowl.com/12uc.mp3", 0.0, 0.0, 0.0, 50.0, 0);
new str[128], aName[MAX_PLAYER_NAME], aLVL[MAX_PLAYERS];
GetAdminLvlName(playerid);
GetPlayerName(playerid, aName, sizeof(aName));
format(str, sizeof(str), "** %s %s has just turned on the song: I'm sexy and I know it, L.M.F.A.O", aLVL, aName);
SendClientMessageToAll(COLOR_YELLOW, str);
}
}
case 2:
{
for(new i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i))
{
PlayAudioStreamForPlayer(i, "http://promodj.com/download/2128647/I_Will_Not_Bow_Breaking_Benjamin_TechCrunch_Dubstep_remix.mp3", 0.0, 0.0, 0.0, 50.0, 0);
new str[128], aName[MAX_PLAYER_NAME], aLVL[MAX_PLAYERS];
GetAdminLvlName(playerid);
GetPlayerName(playerid, aName, sizeof(aName));
format(str, sizeof(str), "** %s %s has just turned on the song: I will not bow - Breaking Benjamin'", aLVL, aName);
SendClientMessageToAll(COLOR_YELLOW, str);
}
}
case 3:
{
for(new i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i))
{
PlayAudioStreamForPlayer(i, "http://mobvid.hu/download.php/a/y9KQ6zr6kCPj8.mp3/lmfao-party-rock-anthem-ft-lauren-bennet.mp3", 0.0, 0.0, 0.0, 50.0, 0);
new str[128], aName[MAX_PLAYER_NAME], aLVL[MAX_PLAYERS];
GetAdminLvlName(playerid);
GetPlayerName(playerid, aName, sizeof(aName));
format(str, sizeof(str), "** %s %s has just turned on the song: Party Rock Anthem - L.M.F.A.O", aLVL, aName);
SendClientMessageToAll(COLOR_YELLOW, str);
}
}
case 4:
{
for(new i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i))
{
PlayAudioStreamForPlayer(i, "http://dc398.4shared.com/img/639808716/6038b3d9/dlink__2Fdownload_2FLE2-zN9S_3Ftsid_3D20110726-54320-ce98f040/preview.mp3", 0.0, 0.0, 0.0, 50.0, 0);
new str[128], aName[MAX_PLAYER_NAME], aLVL[MAX_PLAYERS];
GetAdminLvlName(playerid);
GetPlayerName(playerid, aName, sizeof(aName));
format(str, sizeof(str), "** %s %s has just turned on the song: I just had sex - AKON", aLVL, aName);
SendClientMessageToAll(COLOR_YELLOW, str);
}
}
case 5:
{
for(new i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i))
{
PlayAudioStreamForPlayer(i, "http://www.therundown.tv/audio/Soulja_Boy_feat_Sammie_-_Kiss_Me_Thru_The_Phone.mp3", 0.0, 0.0, 0.0, 50.0, 0);
new str[128], aName[MAX_PLAYER_NAME], aLVL[MAX_PLAYERS];
GetAdminLvlName(playerid);
GetPlayerName(playerid, aName, sizeof(aName));
format(str, sizeof(str), "** %s %s has just turned on the song: Kiss me thru the phone - Soulja Boy", aLVL, aName);
SendClientMessageToAll(COLOR_YELLOW, str);
}
}
}
}
}
}
return 1;
}