SA-MP Forums Archive
Dialog doesn't responds - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Dialog doesn't responds (/showthread.php?tid=438129)



Dialog doesn't responds - Lorenzosdm - 18.05.2013

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");
           
        }
       
       
       
    }
   
}



Re: Dialog doesn't responds - LilBob - 18.05.2013

Use if listitem=1 , etc..


Re: Dialog doesn't responds - Renas - 18.05.2013

in your CMD you use:
ShowPlayerDialog(playerid, DIALOG_RADIO

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


Re: Dialog doesn't responds - Dopefull - 18.05.2013

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;
}



Re: Dialog doesn't responds - Richie© - 18.05.2013

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;
}



Re: Dialog doesn't responds - Lorenzosdm - 19.05.2013

Fixed thanks for the help!!