loading issue after login failure
#1

So i've made login attempts for my login system, you get 3 more attempts after you enter the wrong password.I've tested every attempt just to see if everything is loading fine after i enter in the correct password.Everything worked fine, but when i tried to fail the last attempt and get kicked, i relogged and tried to login correctly in first try, my money didn't load.Here's the attempts if i fail at first try:
Код:
				else
				{
				    new string[128];
				    LoginAttempt[playerid]++;
					format(string,sizeof(string),"{DB2424}Wrong account password, please enter the right one.");
					ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Red County Deathmatch - Login",string,"Login","Quit");
					if(LoginAttempt[playerid] == 4)
					{
						SendClientMessage(playerid,COLOR_RED,"You have failed all login attempts, therefore you are kicked.");
					    SetTimerEx("passkick",1000,false,"i",playerid);
					}
					if(LoginAttempt[playerid] == 3)
					{
						SendClientMessage(playerid,COLOR_RED,"Wrong password, you have 1 more attempt left.");
					}
					if(LoginAttempt[playerid] == 2)
					{
                        SendClientMessage(playerid,COLOR_RED,"Wrong password, you have 2 more attempts left.");
					}
					if(LoginAttempt[playerid] == 1)
					{
					    SendClientMessage(playerid,COLOR_RED,"Wrong password, you have 3 more attempts left.");
					}
				}
			}
		}
Login at first try part:
Код:
if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
			    {
			        INI_ParseFile(UserPath(playerid),"LoadUser_%s",.bExtra = true,.extra = playerid);
			        GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]);
			        SetPlayerScore(playerid,PlayerInfo[playerid][pScore]);
			        SetPlayerSkin(playerid,PlayerInfo[playerid][pSkin]);
			        SetPlayerVirtualWorld(playerid,0);
		         	new text[128],level = PlayerInfo[playerid][pAdmin],name[MAX_PLAYER_NAME];
					GetPlayerName(playerid,name,sizeof(name));
					format(text,sizeof(text),"*%s(%i) has logged in as admin level %d.",name,playerid,level);
					if(PlayerInfo[playerid][pAdmin] > 0) SendMessageToAdmin(text);
			        SendClientMessage(playerid,-1,"You have logged in to your account, welcome back.");
			        TogglePlayerSpectating(playerid, 0);
				}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)