Dialog problem
#1

Hey,i have a problem(again o.O),this time with dialogs.
I'm embarrassed to ask it,but here
pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
 
    if(dialogid == 1 && response)
    switch(listitem)
    {
      case 0:
      {
        ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Choose from list:", "Red\nBlue\nLight blue\nGreen\nLight Green\nYellow\nLight yellow\nBlack\nWhite\nOrange\nBrown", "Apply", "Cancel");
      }
      case 1:
      {
        ShowPlayerDialog(playerid, 3,DIALOG_STYLE_INPUT,"Write color"," Write a color in hex notation format:","Apply","Cancel");
      }
    }
    if(dialogid == 2 && response)
    switch(listitem)
    {
      case 0:
      {
        SetPlayerColor(playerid,COLOR_RED);
            }
            case 1:
            {
              SetPlayerColor(playerid,COLOR_BLUE);
            }
            case 2:
            {
            SetPlayerColor(playerid,COLOR_LIGHTBLUE);
            }
            case 3:
      {
        SetPlayerColor(playerid,COLOR_GREEN);
            }
            case 4:
            {
              SetPlayerColor(playerid,COLOR_LIGHTGREEN);
            }
            case 5:
            {
              SetPlayerColor(playerid,COLOR_YELLOW);
            }
            case 6:
      {
        SetPlayerColor(playerid,COLOR_LIGHTYELLOW);
            }
            case 7:
            {
              SetPlayerColor(playerid,COLOR_BLACK);
            }
            case 8:
            {
              SetPlayerColor(playerid,COLOR_WHITE);
            }
            case 9:
      {
        SetPlayerColor(playerid,COLOR_ORANGE);
            }
            case 10:
            {
              SetPlayerColor(playerid,COLOR_BROWN);
            }
        }
        if(dialogid == 3 && response)
        {
          new tmp[128];
            if(response)
            {
              if(strval(tmp) < 10 || strval(tmp) > 10)
                {
                  SendClientMessage(playerid,COLOR_RED,"ERROR: Invailed color format.");
                }
                else
                {
                SetPlayerColor(playerid,strval(tmp));
              }
            }
        }
    return 1;
}
The problem is,when i choose one of the options from dialog id 1,it doesn't show dialog id 2 or 3.
E.X if i chose "Choose from list" it doesn't affect.
Probably something stupid I've done.
Anyway thanks in advance to all helpers.
Reply


Messages In This Thread
Dialog problem - by [XST]O_x - 04.06.2010, 14:34
Re: Dialog problem - by ViruZZzZ_ChiLLL - 04.06.2010, 18:37
Re: Dialog problem - by [XST]O_x - 05.06.2010, 13:10
Re: Dialog problem - by ViruZZzZ_ChiLLL - 05.06.2010, 14:57
Re: Dialog problem - by [XST]O_x - 05.06.2010, 15:30
Re: Dialog problem - by LTomi - 05.06.2010, 15:39
Re: Dialog problem - by [XST]O_x - 05.06.2010, 15:53
Re: Dialog problem - by -Rebel Son- - 05.06.2010, 16:17
Re: Dialog problem - by [XST]O_x - 05.06.2010, 16:24
Re: Dialog problem - by [XST]O_x - 06.06.2010, 12:46
Re: Dialog problem - by Nero_3D - 06.06.2010, 13:14
Re: Dialog problem - by [XST]O_x - 06.06.2010, 14:43

Forum Jump:


Users browsing this thread: 1 Guest(s)