Dialog doesn't responds
#1

The second dialog doesn't open after i confirm it in the first dialog, I got no warnings and errors.

If someone can tell me the problem thank you for that

pawn Код:
CMD:radio(playerid,params[])
{
    new  Radio[1024];
    format(Radio, sizeof(Radio), "{00FF00}Enter URL");
    ShowPlayerDialog(playerid, DIALOG_RADIO, DIALOG_STYLE_LIST, "Stream your own radio:", Radio, "Confirm", "Close");
    return 1;
}

pawn Код:
if(dialogid == 9997)
    {
        if(response)
        {
            if(listitem == 0)
            {
              ShowPlayerDialog(playerid, DIALOG_RADIOURL, DIALOG_STYLE_INPUT, "{FFFFFF}Enter Station URL:","Paste a radio stream URL:", "Confirm", "Close");
            }
        }
     }


if(dialogid == 9998)

{
    if(response)
   
    {
        if(strlen(inputtext) > 0)
       
        {
            PlayAudioStreamForPlayer(playerid, inputtext);
           
        }
        else
       
        {
            SendClientMessage(playerid,RED,"Not Valid");
           
        }
       
       
       
    }
   
}
Reply
#2

Use if listitem=1 , etc..
Reply
#3

in your CMD you use:
ShowPlayerDialog(playerid, DIALOG_RADIO

you should have to use in OnDialogResponse this:
if(dialogid==DIALOG_RADIO)
Reply
#4

Why do you have two dialog id's? I don't know how to use two dialogs in 1 command, but if you had 1 dialog it should look like this:

Код:
CMD:radio(playerid,params[])
{
    new  Radio[1024];
    format(Radio, sizeof(Radio), "{00FF00}Enter URL");
    ShowPlayerDialog(playerid,9997, DIALOG_RADIO, DIALOG_STYLE_LIST, "Stream your own radio:", Radio, "Confirm", "Close");
    return 1;
}
Try to make it to 1 dialog instead and use the dialog id in your command

And if you want to use the second dialog:

Код:
CMD:radio(playerid,params[])
{
    new  Radio[1024];
    format(Radio, sizeof(Radio), "{00FF00}Enter URL");
    ShowPlayerDialog(playerid,9998, DIALOG_RADIO, DIALOG_STYLE_LIST, "Stream your own radio:", Radio, "Confirm", "Close");
    return 1;
}
Reply
#5

If DIALOG_RADIO is 9998, all you have to do is change DIALOG_STYLE_LIST to DIALOG_STYLE_INPUT.

Edit: Here, you dont need 1024 cells for "{00FF00}Enter URL".
pawn Код:
CMD:radio(playerid,params[])
{
    ShowPlayerDialog(playerid, 9998, DIALOG_STYLE_INPUT, "Stream your own radio:", "{00FF00}Enter URL", "Confirm", "Close");
    return 1;
}
Reply
#6

Fixed thanks for the help!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)