Full server music system
#1

Does anyone here know how i can make a filterscript so i can enter a ******* link into my server and play it to the whole server? i found a couple of them yesterday but they dont seem to be working with 0.3e. If possible, can someone please send me a link to the filterscript or make me a little code that i can add in to my server please.

Thanks in advance
Reply
#2

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)
Код:
COMMAND:amusic(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] >= 3)
	{
		ShowPlayerDialog(playerid, DIALOG_AMUSIC, DIALOG_STYLE_LIST, "Admin-Music list", "1. Champagne Showers - L.M.F.A.O./r/n2. Sexy and I know it - L.M.F.A.O./r/n3. I will not bow - Breaking Benjamin'/r/n4. Party Rock - L.M.F.A.O./r/n5.I just had sex - AKON/r/n6. Kiss me thru the phone - Soulja Boy", "Start", "Cancel");
	}
	return 1;
}
and OnPlayerDialogResponse, put this
Код:
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;
}
EDIT: on top of your script, place this
Код:
#define DIALOG_AMUSIC 5462
Reply
#3

Thanks heaps man
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)