Another help needed.
#1

Well, I wonder why /music is not working... :/ (It's a fliterscript)

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/music", cmdtext, true, 10) == 0)
    {
        ShowPlayerDialog(playerid, 69, DIALOG_STYLE_LIST, "Music", "1. Daniel Kim - Pop Danthology 2012\n2. Test", "Play", "Cancel");
        return 1;
    }
    return 0;
}
Yeah, if this is solved, I will add more songs into it.

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(response)// They pressed the first button.
    {
        switch(dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs.
        {
            case 1:// Our dialog!
            {
                switch(listitem)// Checking which listitem was selected
            {
                case 0: PlayAudioStreamForPlayer(playerid, "http://racerevolution.cu.cc/music/Daniel%20Kim%20-%20Pop%20Danthology%202012.mp3");
                case 1: SendClientMessage(playerid, 0xFF000000, "Testing only!");
            }
        }
    }
 }
    return 1;
}
I will give +rep if who has helped and solved this problem.
Reply
#2

You dialog id is 69 in ShowPlayerDialog
Reply
#3

Maybe your URL isn't working.
and for info, you can give reputation point if your post not 50 or above
EDIT:
Change this code
pawn Код:
ShowPlayerDialog(playerid, 69, DIALOG_STYLE_LIST, "Music", "1. Daniel Kim - Pop Danthology 2012\n2. Test", "Play", "Cancel");
to this code
pawn Код:
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Music", "1. Daniel Kim - Pop Danthology 2012\n2. Test", "Play", "Cancel");
Reply
#4

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid ==69)
     {
          if(response)
        {
        if(listitem == 0)
        {
                PlayAudioStreamForPlayer(playerid, "http://racerevolution.cu.cc/music/Daniel%20Kim%20-%20Pop%20Danthology%202012.mp3");
}
                if(listitem == 0)
        {
 SendClientMessage(playerid, 0xFF000000, "Testing only!");
}
}
}
}
return 1;
}
Try this one.Maybe it works.I didnt tested yet
Reply
#5

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 69)
    {
        if(response)
        {
            if(listitem == 0)
            {
                PlayAudioStreamForPlayer(playerid, "http://racerevolution.cu.cc/music/Daniel%20Kim%20-%20Pop%20Danthology%202012.mp3");
                SendClientMessage(playerid, 0xFF000000, "Testing only!");
            }
            if(listitem == 0)
            {
                PlayAudioStreamForPlayer(playerid, "http://racerevolution.cu.cc/music/Daniel%20Kim%20-%20Pop%20Danthology%202012.mp3");
                SendClientMessage(playerid, 0xFF000000, "Testing only!");
            }
        }
        return 1;
    }
    return 1;
}
Read THIS!

EDIT: too late
Reply
#6

Oops, my mistake. Anyway, Kiyozi, it's working, www.racerevolution.cu.cc/music as I created a folder via volt-host file manager.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)