[FilterScript] Anti-Bots Flood
#1

Ok, so i created this Anti-Bots Flood protection, its an really easy system, but cool.
I've created it within 5 minutes.
pawn Код:
// Anti-Flood
#include <a_samp>
#define MAX_CONNECT 1
new UserMaxConnect[MAX_PLAYERS];
new ip[30];
forward CheckIfFlood(playerid);
public CheckIfFlood(playerid)
{
  new ips[MAX_PLAYERS];
  for(new i = 0; i < MAX_PLAYERS; i++)
  {
     GetPlayerIp(playerid, ips, sizeof(ips));
         if(!strcmp(ip, ips, false))
         {
                UserMaxConnect[playerid]++;
         }
  }
  if(UserMaxConnect[playerid] > MAX_CONNECT)
  {
         Ban(playerid);
  }
  return 1;
}
 
public OnPlayerConnect(playerid)
{
  GetPlayerIp(playerid, ip, sizeof(ip));
  UserMaxConnect[playerid] = 0;
  SetTimerEx("CheckIfFlood", 1000, true, "i", playerid);
  return 1;
}
//Anti bots - Flood Protection
// Nu se pot connecta mai mult de numarul de la MAX_CONNECT de pe acelasi IP
An nice, protection against those wants to flood your server.
Reply


Messages In This Thread
Anti-Bots Flood - by XStormiest - 15.09.2014, 15:19
Re: Anti-Bots Flood - by IDarkness - 15.09.2014, 23:19
Re: Anti-Bots Flood - by SickAttack - 15.09.2014, 23:29
Re: Anti-Bots Flood - by Abagail - 16.09.2014, 00:12
Re: Anti-Bots Flood - by XStormiest - 18.09.2014, 09:15
Re: Anti-Bots Flood - by rymax99 - 18.09.2014, 09:46
Re: Anti-Bots Flood - by KayJ - 18.09.2014, 09:55
Re: Anti-Bots Flood - by Manuel_Franco - 21.09.2014, 16:35
Re: Anti-Bots Flood - by XStormiest - 21.09.2014, 17:02
Re: Anti-Bots Flood - by momo123 - 21.09.2014, 17:13

Forum Jump:


Users browsing this thread: 2 Guest(s)