28.12.2010, 15:11
Sorry, but I guess this one is the best way:
At TOP:
And add at OnPlayerConnect:
You need to reset the tries when the ID connects.
Tell me if there is any bug.
Jeffry
At TOP:
pawn Код:
new RCONAttempts[MAX_PLAYERS];
pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
if(!success)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new pIP[16]; GetPlayerIP(playerid, pIP, 16);
if(!strcmp(ip, pIP))
{
RCONAttempts[i]++;
if(RCONAttempts[i]>=3)
{
SendClientMessage(i, 0xF0F0FFF, "Wrong Password. Good Bye!");
Ban(i);
RCONAttempts[i]=0;
}
}
}
}
}
return 1;
}
pawn Код:
RCONAttempts[playerid]=0;
You need to reset the tries when the ID connects.

Tell me if there is any bug.
Jeffry
