Wiki alapján csináltam, nem biztos, hogy tökéletesen mûködik.
[pawn]public OnRconLoginAttempt(ip[], password[], success)
{
if(!success) //If the password was incorrect
{
printf(\"FAILED RCON LOGIN BY IP %s USING PASSWORD %s\",ip, password);
new pip[128], str[128], Player[128], file[256], hour, minute, year, month, day, sec;
gettime(hour, minute, sec); getdate(year, month, day);
for(new i=0; i<MAX_PLAYERS; i++) //Loop through all players
{
GetPlayerIp(i, pip, sizeof(pip)); GetPlayerName(i,Player,sizeof(Player));
format(file,sizeof(file),\"/RoszRCON/%s.txt\",Player);
dini_Create(file);
format(str,sizeof(str),\"Név: %s IP: %d Dátum: %d/%d/%d/ %d.%d.%d\", Player, pip, year, month, day, hour, minute, sec);
dini_Set(file,\"Rosz RCON belépési kísérlet\",str);
if(!strcmp(ip, pip, true)) //If a player\'s IP is the IP that failed the login
{
SendClientMessage(i, 0xFFFFFFFF, \"Wrong Password. Bye!\"); //Send a message
Ban(i); //They are now banned.
}
}
}
return 1;
}[/pawn]