Rcon protection
#4

Код:
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;
}
This shall work, You can refer to this https://sampforum.blast.hk/showthread.php?tid=309482
Reply


Messages In This Thread
Rcon protection - by NexySamp - 04.07.2015, 11:47
Re: Rcon protection - by rymax99 - 04.07.2015, 11:56
Re: Rcon protection - by nezo2001 - 04.07.2015, 11:59
Re: Rcon protection - by yeehao98 - 04.07.2015, 11:59
Re: Rcon protection - by NexySamp - 04.07.2015, 12:23
Re: Rcon protection - by rymax99 - 04.07.2015, 12:30
Re: Rcon protection - by NexySamp - 04.07.2015, 13:27
Re: Rcon protection - by Sime30 - 04.07.2015, 13:34
Re: Rcon protection - by NexySamp - 04.07.2015, 13:47
Re: Rcon protection - by Sime30 - 04.07.2015, 14:01

Forum Jump:


Users browsing this thread: 1 Guest(s)