So basiclly after registration show tutorial dialog.
#5

Ohh I got it Thanks
I got a problem after rigistration it's not showing dialog...

pawn Код:
if(dialogid == MAINMENU || dialogid == dregister1 || dialogid == MAINMENU2)
    {
        if(dialogid == MAINMENU)
        {
            if( response == 0 )
            {
                SendClientMessageEx(playerid, COLOR_RED, "SERVER: You have been kicked out automatically.");
                Kick(playerid);
            }
            else
            {
                if(strlen(inputtext))
                {
                    new tmppass[64];
                    strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
                    Encrypt(tmppass);
                    OnPlayerLogin(playerid,tmppass);
                }
                else
                {
                    new loginname[64];
                    GetPlayerName(playerid,loginname,sizeof(loginname));
                    ShowPlayerDialog(playerid,MAINMENU,DIALOG_STYLE_INPUT,"Login","Incorrect password. \n \nThat name is registered, you may now enter your password.","Login","Exit");
                    gPlayerLogTries[playerid] += 1;
                    if(gPlayerLogTries[playerid] == 2) { SendClientMessageEx(playerid, COLOR_RED, "SERVER: Wrong password, you have been kicked out automatically."); Kick(playerid); }
                }
            }
        }
        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;
            }
        }
        if(dialogid == MAINMENU2)
        {
            if(strlen(inputtext))
            {
                GetPlayerName(playerid, sendername, sizeof(sendername));
                if(doesAccountExist(sendername))
                {
                    SendClientMessageEx(playerid, COLOR_YELLOW, "That username is already taken, please choose a different one.");
                    return 1;
                }
                new tmppass[64];
                strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
                Encrypt(tmppass);
                OnPlayerRegister(playerid,tmppass);
            }
        }
    }
pawn Код:
switch(frame)
    {
        case 1:
        {
            new ip[32];
            GetPlayerIp(playerid, ip, 32);
            format(titlestring, sizeof(titlestring), "Login - %s", GetPlayerNameEx(playerid));
            format(string, sizeof(string), "Welcome to Natural Los Santos Roleplay, %s.\n\nThis Account Is Registred Please Fill In Your Password To Login In", GetPlayerNameEx(playerid),  ip);
            ShowPlayerDialog(playerid,MAINMENU,DIALOG_STYLE_INPUT,titlestring,string,"Login","Exit");
        }
        case 2:
        {
            new ip[32];
            GetPlayerIp(playerid, ip, 32);
            format(titlestring, sizeof(titlestring), "Register - %s", GetPlayerNameEx(playerid));
            format(string, sizeof(string), "Welcome to Natural Los Santos Roleplay, %s.\n\nYou Have Not Yet Registerd Please Do And Fill Out The Password.", GetPlayerNameEx(playerid),  ip);
            ShowPlayerDialog(playerid,MAINMENU2,DIALOG_STYLE_INPUT,titlestring,string,"Register","Exit");
        }
        case 3:
        {
            ShowPlayerDialog(playerid,dregister1,DIALOG_STYLE_INPUT,"Error","When is your Birthday? ( DD/MM/YYYY )","Enter","Cancel");
        }
        case 4:
        {
            new ip[32];
            GetPlayerIp(playerid, ip, 32);
            format(titlestring, sizeof(titlestring), "Login - %s", GetPlayerNameEx(playerid));
            format(string, sizeof(string), "Invalid Password!\n\nWelcome to Natural Los Santos Roleplay, %s.\n\nThis Account Is Registred Please Fill In Your Password To Login In", GetPlayerNameEx(playerid),  ip);
            ShowPlayerDialog(playerid,MAINMENU,DIALOG_STYLE_INPUT,titlestring,string,"Login","Exit");
        }
    }
}
Reply


Messages In This Thread
So basiclly after registration show tutorial dialog. - by Scrillex - 18.03.2013, 10:48
Re: So basiccly after registration show tutorial dialog. - by Misiur - 18.03.2013, 10:55
Re: So basiccly after registration show tutorial dialog. - by Scrillex - 18.03.2013, 11:03
Re: So basiclly after registration show tutorial dialog. - by Misiur - 18.03.2013, 11:05
Re: So basiclly after registration show tutorial dialog. - by Scrillex - 18.03.2013, 11:27

Forum Jump:


Users browsing this thread: 1 Guest(s)