28.10.2009, 19:53
pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
//#if allow == true
if(!success) //If the password was incorrect
{
new playerip[16];
print("OnRconLoginAttempt - Called ~");
for(new i; i < MAX_PLAYERS; i++)
{
GetPlayerIp(i, playerip, sizeof(playerip));
if(!strcmp(ip, playerip, true))
{
SendClientMessage(i, 0xFFFFFFFF, "Wrong Password. Bye!");
printf("FAILED RCON LOGIN BY IP %s USING PASSWORD %s !",ip, password);
Ban(i);
}
}
print("OnRconLoginAttempt - Called after ~ for loop ~");
}
//#endif
return 1;
}
http://pastebin.com/m18d31b53