Need Help with login
#1

I want to do this: when someone enters incorrect password, It sends him the remaining attempts of logging in otherwise he will get kick, but I tried to do that and it keeps saying: Incorrect Password! 3 Attempts Of Logging Left Before Being Kicked. it keeps saying 3 attempts, why it's not decreasing? whats the problem in this:

pawn Код:
else
                {
                LoginWarns[playerid] ++;
                new warnmsg[128];
                if(LoginWarns[playerid] < MAX_LOGINS)
                {
                    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"You have entered an incorrect password.\n"COL_WHITE"Type your password below to login.","Login","Quit");
                    format(warnmsg, sizeof(warnmsg), "Incorrect Password! %d Attempt(s) Of Logging Left Before Being Kicked!", MAX_LOGINS-LoginWarns[playerid]);
                    SendClientMessage(playerid, 0xFF0000AA, warnmsg);
                    return 1;
                }
                if(LoginWarns[playerid] == MAX_LOGINS)
                {
                    LoginKickWithMessage(playerid, 0xFF0000AA, "You Have Failed In Logging In, You Have Been Kicked.");
                    LoginWarns[playerid] = 0;
                    return 1;
                }
                }
            }
    }
Reply


Messages In This Thread
Need Help with login - by Youssef221 - 07.05.2015, 08:08
Re: Need Help with login - by justice96 - 07.05.2015, 08:17
Re: Need Help with login - by Youssef221 - 07.05.2015, 08:20
Re: Need Help with login - by justice96 - 07.05.2015, 08:23
Re: Need Help with login - by Youssef221 - 07.05.2015, 08:26
Re: Need Help with login - by justice96 - 07.05.2015, 08:30
Re: Need Help with login - by Youssef221 - 07.05.2015, 08:49
Re: Need Help with login - by Infinity - 07.05.2015, 09:57
Re: Need Help with login - by AroseKhanNiazi - 07.05.2015, 15:07

Forum Jump:


Users browsing this thread: 6 Guest(s)