12.07.2013, 18:14
Hello, how can i make in my register/login system, that when an user typed 3 wrong passwords that he get kicked then?
new NumAttempt[MAX_PLAYERS];
NumAttempt[playerid] ++;
if(NumAttempt[playerid] == 3)
{
SendClientMessage(playerid, -1,"You have typed your password wrong 3 times and got kicked by the server!");
Kick(playerid);
return 1;
}
Better if you show your codes so we can add to it.
Anyway, you'll need to add something like this: pawn Код:
|
//On the top of the script, with the other variables
new Attempt[MAX_PLAYERS];
//OnPlayerConnect
Attempt[playerid] = 0;
//OnDialogResponse, DIALOG_ID
Attempt[playerid] ++1;
if(Attempt[playerid] == 3) kick(playerid);