04.07.2015, 11:59
Код:
public OnRconLoginAttempt(ip[], password[], success)
{
if(!success)
{
printf("FAILED RCON LOGIN BY IP %s USING PASSWORD %s",ip, password);
new pip[16];
for(new i=0; i<MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pAdmin] >= 1) return 1;
GetPlayerIp(i, pip, sizeof(pip));
if(!strcmp(ip, pip, true))
{ new str[128], name[MAX_PLAYER_NAME];
GetPlayerName(i, name, sizeof(name));
format(str, sizeof(str), "{37DB45}%s {FF0000}was auto-banned by {0000FF}GOD{FF0000}. Reason: {DB881A}Attepmt to hack Rcon{FF0000}.", name);
SendClientMessageToAll(0xFFFFFFFF,str);
SendClientMessage(i, 0xFFFFFFFF, "You're banned.");
Ban(i);
}
}
}
return 1;
}

