Another Login Problem!
#9

I did it like this and it's only show first password is incorrect and there is no dialog return for other and i can spawn myself!

Код:
if(GetPVarInt(playerid, "FailedLoginAttempt") == 0)
    		{
        		SetPVarInt(playerid, "FailedLoginAttempt", 1);
        		SendClientMessage(playerid, -1, "SERVER: The password you have entered is incorrect (1/3 attempts used).");
        		ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Login", string1, "Login", "Cancel");
     		}
      		else if(GetPVarInt(playerid, "FailedLoginAttempt") == 1)
       		{
            	SetPVarInt(playerid, "FailedLoginAttempt", 2);
              	SendClientMessage(playerid, -1, "SERVER: The password you have entered is incorrect (2/3 attempts used).");
              	ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Login", string1, "Login", "Cancel");
    		}
     		else if(GetPVarInt(playerid, "FailedLoginAttempt") == 2)
      		{
               	SetPVarInt(playerid, "FailedLoginAttempt", 3);
      			SendClientMessage(playerid, -1, "SERVER: The password you have entered is incorrect (3/3 attempts used).");
       	  		ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Login", string1, "Login", "Cancel");
       		}
    		else if(GetPVarInt(playerid, "FailedLoginAttempt") == 3)
    		{
        		DeletePVar(playerid, "FailedLoginAttempt");
           		SendClientMessage(playerid, -1, "SERVER: You have used up all your login attempts, and hence got kicked.");
        		Kick(playerid);
		  	}
Reply


Messages In This Thread
Another Login Problem! - by Hunud - 10.04.2017, 09:58
Re: Another Login Problem! - by Kane - 10.04.2017, 10:02
Re: Another Login Problem! - by Hunud - 10.04.2017, 10:07
Re: Another Login Problem! - by khRamin78 - 10.04.2017, 10:20
Re: Another Login Problem! - by Hunud - 10.04.2017, 10:36
Re: Another Login Problem! - by khRamin78 - 10.04.2017, 10:40
Re: Another Login Problem! - by Hunud - 10.04.2017, 10:44
Re: Another Login Problem! - by coool - 10.04.2017, 10:45
Re: Another Login Problem! - by Hunud - 10.04.2017, 10:56
Re: Another Login Problem! - by khRamin78 - 10.04.2017, 11:09

Forum Jump:


Users browsing this thread: 1 Guest(s)