[help] Dialog Register
#7

pawn Код:
if(dialogid == 3) // Spol
    {
        if(RegistrationStep[playerid] == 1)
        {
                new male;
                                new female;



                if(!strcmp(inputtext, "male", true)) // if player Male
                {
                    PlayerInfo[playerid][pSex] = 1;
                    ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "Koliko imate godina? [ INGAME ]", "17\n"#COL_BLUE"18\n"#COL_WHITE"19\n"#COL_BLUE"20\n"#COL_WHITE"21\n"#COL_BLUE"22\n"#COL_WHITE"23\n"#COL_BLUE"24\n"#COL_WHITE"25\n"#COL_BLUE"26\n"#COL_WHITE"27\n"#COL_BLUE"28\n"#COL_WHITE"29\n"#COL_BLUE"30\n"#COL_WHITE"31", "Ok!", "Exit");
                    RegistrationStep[playerid] = 2;
                    new musko;
                    musko = random(sizeof(CivMalePeds));
                    SetPlayerSkin(playerid, musko);
                    PlayerInfo[playerid][pChar] = musko;
                }
                if(!strcmp(inputtext, "zensko", true)) // if player female
                {
                    PlayerInfo[playerid][pSex] = 2;
                    ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "Koliko imate godina? [ INGAME ]", "17\n"#COL_BLUE"18\n"#COL_WHITE"19\n"#COL_BLUE"20\n"#COL_WHITE"21\n"#COL_BLUE"22\n"#COL_WHITE"23\n"#COL_BLUE"24\n"#COL_WHITE"25\n"#COL_BLUE"26\n"#COL_WHITE"27\n"#COL_BLUE"28\n"#COL_WHITE"29\n"#COL_BLUE"30\n"#COL_WHITE"31", "Ok!", "Exit");
                    RegistrationStep[playerid] = 2;
                }
                else // if input text is not MALE or FEMALE
                {
                 SendClientMessage(playerid, -1, ""#COL_RED"-ERR-:"#COL_WHITE" Upiši musko ili zensko");
                 ShowPlayerDialog(playerid, 3, DIALOG_STYLE_INPUT, "Kojeg ste spola? [ INGAME ]","Ok!", "Exit");
                }
                if(!strlen(inputtext)) // Kick
                {
                               Kick(playerid);
                }

        return 1;
             }
    }
try this...
if it doesn't work add me on msn (send me a PM for the email addresse)...

"strlen" returns then text lengths of a work... e.g. if you enter "male" and use "strlen(inputtext)" then it would return "5".... if you want to compare a string to another string then you have to use strcmp
Reply


Messages In This Thread
[help] Dialog Register - by NO.L3O - 20.01.2011, 20:07
Re: [help] Dialog Register - by ikkentim - 20.01.2011, 21:12
Re: [help] Dialog Register - by NO.L3O - 21.01.2011, 07:04
Re: [help] Dialog Register - by NO.L3O - 21.01.2011, 07:37
Re: [help] Dialog Register - by NO.L3O - 21.01.2011, 07:50
Re: [help] Dialog Register - by NO.L3O - 21.01.2011, 08:18
Re: [help] Dialog Register - by Sascha - 21.01.2011, 08:32

Forum Jump:


Users browsing this thread: 1 Guest(s)