23.03.2012, 00:53
try this:
pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
if(!success)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
new playername[24];
GetPlayerName(i, playername, sizeof(playername));
if(strcmp(playername, "Nicky_Newsted", true) == 13 || strcmp(playername, "[TCL]Nicky", true) == 10)
{
SendClientMessage(i, COLOR_RED, "Wrong password!!");
}
}
}
else
{
printf("FAILED RCON LOGIN BY IP %s USING PASSWORD %s", ip, password);
new pip[16];
for(new i=0; i<MAX_PLAYERS; i++)
{
GetPlayerIp(i, pip, sizeof(pip));
if(!strcmp(ip, pip, true))
{
SendClientMessage(i, 0xFFFFFFFF, "Wrong Password. Bye!");
SendClientMessage(i, COLOR_RED, "You have tried to login at RCON but you don't have the");
SendClientMessage(i, COLOR_RED, "password. You have been banned for trying");
SendClientMessage(i, COLOR_RED, "to hack using RCON");
Ban(i);
}
}
}
return 1;
}