[FilterScript] Music library
#1

I welcome all who are interested!

On this subject, a filterscript found that for ara to play music off of a given panel dialog (PlayAudioStreamForPlayer), the music is quite easy to install.
Code:
pawn Код:
new Music[][][] = {

    {"Music name","http://yourwebsite.com/"}
};
Explanation:

Music title: Give me the address of the multimedia such as music, Hardstyle mix.
http://yourwebsite.com/: This should be made of the music available to carry out the command.


Download
Reply
#2

usefull
ty
+Rep
Reply
#3

Код:
CMD:sm(playerid) return cmd_stopmusic(playerid);
CMD:stopmusic(playerid) {
Код:
CMD:sm(playerid, params[]) return cmd_stopmusic(playerid, params);
CMD:stopmusic(playerid, params[]){
pawn Код:
#define DIALOG_PLAYLIST   (1)
enum audio{
    name[32],
    url[32],
};
new Music[][audio]={
    { "Music name","http://yourwebsite.com/" }, //0
    { "Music name","http://yourwebsite.com/" }, //1
    { "Music name","http://yourwebsite.com/" } //2
};

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){
    switch(dialogid){
        case DIALOG_PLAYLIST:{
            if(response){PlayAudioStreamForPlayer(playerid, Music[listitem][url]);}
        }
    }
    return 0;
}

CMD:sm(playerid, params[]) return cmd_stopmusic(playerid, params);
CMD:stopmusic(playerid, params[]){
    StopAudioStreamForPlayer(playerid);
    return 1;
}

CMD:playlist(playerid, params[]){
    new output[1024] = EOS, data[1024] = EOS;
    for(new idx = 0; idx < sizeof(Music)+1; idx++){
        format(data,sizeof(data),"%d) - %s \n", idx+1, Music[idx][name]);
        strcat(output,  data);
    }
    ShowPlayerDialog(playerid, DIALOG_PLAYLIST, DIALOG_STYLE_LIST, "Music list",output,"Play","Close");
    return 1;
}
Reply
#4

nice to read this, finally find this, thanks bro
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)