Dialog help
#6

hop this work

pawn Код:
if(dialogid == DIALOG_AGE)
    {
        if(response)
        {
                new age = strval(inputtext);
                if(age < 16 || age > 100)
                {
                    ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "Age ","How old are you?\n{FF0000}(( 16 - 100 ))","Answer","Quit");
                    return 1;
                }
                else
                {
                    new string[ 64 ]
                    ;
                    format(string, sizeof(string), "INFO: You're {3BB9FF}%d years old.",age);
                    SendClientMessage(playerid, -1, string);
                    SpawnPlayer(playerid);
                    new file[100];
                    dini_Create(file);
                    dini_IntSet(file, "SEX",PlayerInfo[playerid][pSex]);
                    dini_IntSet(file, "AGE",PlayerInfo[playerid][pAge]);
                    return 1;
                }
        }
        else
        {
            Kick(playerid);
            return 1;
        }
    }
    if(dialogid == DIALOG_SEX)
    {
        if(response)
        {
            PlayerInfo[playerid][pSex] = 1;
            SendClientMessage(playerid, -1, "INFO: You are {3BB9FF}male.");
            ShowPlayerDialog(playerid, DIALOG_SPAWN, DIALOG_STYLE_LIST, "Select Your Shelter", "Grove Street\nJefferson Motel\nMarket Station","Select","Quit");
            SetPlayerSkin(playerid, 60);
            PlayerInfo[playerid][pSkin] = 60;
            ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "- Age -","How old are you??\n{FF0000}(( 16 - 100 ))","Answer","Quit");
        }
        else
        {
            PlayerInfo[playerid][pSex] = 2;
            SendClientMessage(playerid, -1, "INFO: You are {3BB9FF}female.");
            ShowPlayerDialog(playerid, DIALOG_SPAWN, DIALOG_STYLE_LIST, "Select Your Shelter", "Grove Street\nJefferson Motel\nMarket Station","Select","Quit");
            SetPlayerSkin(playerid, 233);
            PlayerInfo[playerid][pSkin] = 233;
            ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "- Age -","How old are you??\n{FF0000}(( 16 - 100 ))","Answer","Quit");
        }
    }
Reply


Messages In This Thread
Dialog help - by Youice - 04.04.2012, 17:58
Re: Dialog help - by .FuneraL. - 04.04.2012, 18:11
Re: Dialog help - by Youice - 04.04.2012, 18:14
Re: Dialog help - by Youice - 04.04.2012, 19:43
Re: Dialog help - by BrandyPenguin - 04.04.2012, 20:57
Re: Dialog help - by jaheem - 04.04.2012, 21:12

Forum Jump:


Users browsing this thread: 1 Guest(s)