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

Try this, I added some returns:
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;
            return ShowPlayerDialog(playerid, 5014,DIALOG_STYLE_LIST,"Ah","So you are a female.Well how old are you?","Select","Cancel");
        }
        else
        {
                    Kick(playerid)
        }
    }
}
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";
        return 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
    }
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)