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

As you can see I set it to 2 So next step.. And even in dialog I did that!
The problem is when register dialog shows up and I put my pw next view for the player was birthday. So basiclly it isn't working at all only registration. Spawns it at 0.0.0.00 localation. . So basiclly I need help on this.. I tryed multiple variants but nothing good camed out!
Full

pawn Код:
if(RegistrationStep[playerid] > 0)
    {
        if(RegistrationStep[playerid] == 1)
        {
            ShowPlayerDialog(playerid,dregister1,DIALOG_STYLE_INPUT,"Error","When is your Birthday? ( DD/MM/YYYY )","Enter","Cancel");
            RegistrationStep[playerid] = 2;
            return 0;
        }
        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 Free Roleplay.!");
            RegistrationStep[playerid] = 0;
            SetPlayerVirtualWorld(playerid, 0);
            ClearChatbox(playerid);
            TutStep[playerid] = 1;
            SpawnPlayer(playerid);
        }
        return 0;
    }
UnderDialog
pawn Код:
if(dialogid == dregister1)
    {
        if(strlen(inputtext))
        {
            new year, month,day;
            getdate(year, month, day);
            new DateInfo[3][20];
            splits(inputtext, DateInfo, '/');
            if(year - strval(DateInfo[2]) > 100 || strval(DateInfo[2]) < 1 || strval(DateInfo[2]) >= year)
            {
                ShowPlayerDialog(playerid,dregister1,DIALOG_STYLE_INPUT,"Error","When is your Birthday? ( DD/MM/YYYY )","Enter","Cancel");
                return 0;
            }
            new check = year - strval(DateInfo[2]);
            if(check == year)
            {
                ShowPlayerDialog(playerid,dregister1,DIALOG_STYLE_INPUT,"Error","When is your Birthday? ( DD/MM/YYYY )","Enter","Cancel");
                return 0;
            }
            if(strval(DateInfo[1]) > month)
            {
                check -= 1;
            }
            else if(strval(DateInfo[1]) == month && strval(DateInfo[0]) > day)
            {
                check -= 1;
            }
            PlayerInfo[playerid][pAge] =
            RegistrationStep[playerid] = 2;
        }
    }
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)