Dialog help, the "cancel" kick is being called even if you dont cancel
#8

This would work.

pawn Код:
if(dialogid == 5013)
        {
            if(response)
            {
                if(listitem == 0)
                {
                    PlayerInfo[playerid][pSex] = 1;
                    PlayerInfo[playerid][pChar] = 26;
                    ShowPlayerDialog(playerid, 5014,DIALOG_STYLE_INPUT,"Ah","So you are a male.Well how old are you?","Select","Cancel");
                }
                else if(listitem == 1)
                {
                    PlayerInfo[playerid][pSex] = 2;
                    PlayerInfo[playerid][pChar] = 91;
                    ShowPlayerDialog(playerid, 5014,DIALOG_STYLE_LIST,"Ah","So you are a female.Well how old are you?","Select","Cancel");
                }
            }
            else
            {
                Kick(playerid)
            }
            return 1;
        }
        if(dialogid == 5014)
        {
            if(response)
            {
                new age = strval(inputtext);
                PlayerInfo[playerid][pAge] = age;
                new Orgin[] = "I'm from America\nI'm from Europe\nI'm from Asia\nI'm from Africa";
                ShowPlayerDialog(playerid, 5015,DIALOG_STYLE_LIST,"So where are you from?",Orgin,"Select","Cancel");
            }
            else
            {
                Kick(playerid)//This kick is being called no mather what you choose
            }
            return 1;
        }
you have placed this:
pawn Код:
else
            {
                Kick(playerid)
            }
Inside the response statement.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)