Dialog problem
#9

Quote:
Originally Posted by _Ч§hмf†ҐЧ™_
after alittle testing, each dialog ID has to return a value. so just put return 1;} at the end of each
Hmm,
like this? :
pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == NAME_COLOR1 && response)
    {
    switch(listitem)
    {
      case 0:
      {
        ShowPlayerDialog(playerid, NAME_COLOR2, 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, NAME_COLOR3,DIALOG_STYLE_INPUT,"Write color"," Write a color in hex notation format:","Apply","Cancel");
      }
    }
    }
    if(dialogid == NAME_COLOR2 && 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);
            }
        }
        return 1;}
        if(dialogid == NAME_COLOR3)
        {
        if(response == 1)
        {
            if(!strlen(inputtext))
            {
                SendClientMessage(playerid, COLOR_RED, "You left the input field blank.");
                ShowPlayerDialog(playerid, NAME_COLOR3,DIALOG_STYLE_INPUT,"Write color"," Write a color in hex notation format:","Apply","Cancel");
            }
            else
            {
                SetPlayerColor(playerid,strval(inputtext));
            }
        }
        else
        {
        ShowPlayerDialog(playerid, NAME_COLOR1, DIALOG_STYLE_LIST, "Name colors dialog", "Choose from a list\nWrite your own color(!)", "Apply", "Cancel");
        }
            return 1;}
        return 1;
}
It didn't work
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)