Help with bot attack
#8

pawn Код:
#include <a_samp>

#define MAX_CONNECT_IN_ROW 3
#define MAX_REJOIN_TIME 4000
new ipCheck[25], IPfound, IPtime;

public OnPlayerConnect(playerid)
{
    new pIP[25];
    GetPlayerIp(playerid, pIP, 25);
    if(strcmp(ipCheck, pIP, false) == 0 && ( GetTickCount() - IPtime ) < MAX_REJOIN_TIME )
    {
        IPfound++;
        if(IPfound > MAX_CONNECT_IN_ROW)
        {
            new str[100];
            format(str, 100, "banip %s", pIP);
            SendRconCommand(str);
            Kick(playerid);
            IPfound=0;
        }
    }
    else
    {
        IPfound=0;
    }
    format(ipCheck, 25, "%s", pIP);
   
    IPtime=GetTickCount();
    return 1;
}
The code is not by me.
Reply


Messages In This Thread
Help with bot attack - by tal_peretz - 13.04.2012, 19:49
Re: Help with bot attack - by CrazyChoco - 13.04.2012, 19:51
Re: Help with bot attack - by ViniBorn - 13.04.2012, 19:52
Re: Help with bot attack - by tal_peretz - 13.04.2012, 21:00
Re: Help with bot attack - by tal_peretz - 13.04.2012, 23:17
Re: Help with bot attack - by Neo Karls - 14.04.2012, 01:50
Re: Help with bot attack - by @Riichard - 14.04.2012, 01:54
Re: Help with bot attack - by Kitten - 14.04.2012, 01:56
Re: Help with bot attack - by tal_peretz - 14.04.2012, 02:11

Forum Jump:


Users browsing this thread: 1 Guest(s)