28.12.2010, 14:34
This works, yeah I did test it:
pawn Код:
new LoginAttempt[MAX_PLAYERS] = 0;
public OnRconLoginAttempt(ip[], password[], success)
{
if(!success)
{
new pip[16];
for(new i=0; i<MAX_PLAYERS; i++)
{
GetPlayerIp(i, pip, sizeof(pip));
if(strcmp(pip, ip) == 0)
{
LoginAttempt[i]++;
if(LoginAttempt[i] > 2)
{
SendClientMessage(i, COLOR_RED, "Wrong Password. Good Bye!");
Ban(i);
}
}
}
}
return 1;
}