Need help with registration dialogs..(Remaking)
#2

pawn Код:
//did u setthe playerrestrationstep 2 1 :?
 if(RegistrationStep[playerid] == 1)
        {
            ShowPlayerDialog(playerid,dregister1,DIALOG_STYLE_INPUT,"Error","When is your Birthday? ( DD/MM/YYYY )","Enter","Cancel");
            RegistrationStep[playerid] = 2;
            return 1;
        }
pawn Код:
else if(RegistrationStep[playerid] == 2)
        {
            new year, month,day;
            getdate(year, month, day);
            new DateInfo[3][20];
            splits(text, DateInfo, '/');
            if(year - strval(DateInfo[2]) > 100 || strval(DateInfo[2]) < 1 || strval(DateInfo[2]) >= year)
            {
                SendClientMessageEx(playerid, COLOR_LIGHTRED, "What is your date of birth? (Use dd/mm/yyyy)");
                return 0;
            }
            new check = year - strval(DateInfo[2]);
            if(check == year)
            {
                SendClientMessageEx(playerid, COLOR_GREEN, "What is your date of birth? (Use dd/mm/yyyy)");
                return 0;
            }
            if(strval(DateInfo[1]) > month)
            {
                check -= 1;
            }
            else if(strval(DateInfo[1]) == month && strval(DateInfo[0]) > day)
            {
                check -= 1;
            }
            PlayerInfo[playerid][pAge] = check;
            PlayerInfo[playerid][pOrigin] = 0;
            format(string, sizeof(string), "Ok, so you are %d year old.",PlayerInfo[playerid][pAge]);
            SendClientMessageEx(playerid, COLOR_YELLOW2, string);
            SendClientMessageEx(playerid, COLOR_LIGHTRED, "Thanks for filling in all the information, Welcome to Galaxy Roleplay.!");
            //SendClientMessageEx(playerid, TEAM_CYAN, "We Hope Your Enjoy Your Stay Make Sure To Check Out Are Fourms");
            RegistrationStep[playerid] = 0;
            SetPlayerVirtualWorld(playerid, 0);
            ClearChatbox(playerid);
            TutStep[playerid] = 1;
        }
        return 1;
Reply


Messages In This Thread
Need help with registration dialogs..(Remaking) ONPLAYERTEXT! - by Scrillex - 18.03.2013, 04:31
Re: Need help with registration dialogs..(Remaking) - by Glad2BeHere - 18.03.2013, 04:50
Re: Need help with registration dialogs..(Remaking) - by Scrillex - 18.03.2013, 04:57
Re: Need help with registration dialogs..(Remaking) - by Scrillex - 18.03.2013, 10:18

Forum Jump:


Users browsing this thread: 1 Guest(s)