[Off] Como detener los ataques con los bots invisibles?
#1

Hola tengo un servidor que hasta ahora iva muy bien cuando me empesaron a atacar con los famosos bots invisibles la pregunta es como detengo el ataque? D:
Reply
#2

PHP код:
// Bots Security Script v1.0B by Impйrio Hosting
#include "a_samp.inc"
new var[MAX_PLAYERS] = {-1,...}, warns[MAX_PLAYERS] = {0,...}, bool:npc[MAX_PLAYERS] = {false,...}, MAX_PLAYERS_ MAX_PLAYERS;
public 
OnFilterScriptInit()
{
        
SendRconCommand("reloadbans");
        print(
"Bots Security Script v1.0B loaded");
        return 
1;
}
public 
OnPlayerConnect(playerid)
{
        if(
CountIP(GetIP(playerid)) >= 6) return BanAll(playerid), 0;
        
MAX_PLAYERS_ playerid MAX_PLAYERS_ playerid GetHighestID(),
        
npc[playerid] = bool:IsPlayerNPC(playerid),
        var[
playerid] = SetTimerEx("BSS",2500,false,"i",playerid),
        
warns[playerid] = 0;
        return 
1;
}
public 
OnPlayerDisconnect(playeridreason)
{
        
MAX_PLAYERS_ GetHighestID(playerid);
        if(
npc[playerid]) npc[playerid] = false;
        if(var[
playerid] != -1)
        {
                
KillTimer(var[playerid]);
                var[
playerid] = -1;
        }
        
warns[playerid] = 0;
        return 
1;
}
stock CountIP(ip[])
{
        new 
0;
        for(new 
0MAX_PLAYERSi++) if(IsPlayerConnected(i) && !strcmp(GetIP(i),ip)) c++;
        return 
c;
}
forward BSS(playerid);
public 
BSS(playerid)
{
        new 
GetPlayerPing(playerid);
        if(
<= || >= 50000)
        {
                if(
warns[playerid] >= 1BanAll(playerid);
                else 
warns[playerid]++, var[playerid] = SetTimerEx("BSS",1500,false,"i",playerid);
        }
        return 
0;
}
stock GetIP(playerid)
{
        new 
ip[16];
        
GetPlayerIp(playerid,ip,sizeof(ip));
        return 
ip;
}
stock BanAll(playerid)
{
        new 
ip[32];
        
GetPlayerIp(playerid,ip,sizeof(ip));
        for(new 
00MAX_PLAYERSi++) if(IsPlayerConnected(i) && !npc[i])
        {
                
GetPlayerPing(i);
                if(
== playerid || !strcmp(ip,GetIP(i)) || <= || >= 50000)
                {
                        
BanEx(i,"Bot");
                        if(var[
i] != -1)
                        {
                                
KillTimer(var[i]);
                                var[
i] = -1;
                        }
                }
        }
        
format(ip,sizeof(ip),"banip %s",ip);
        return 
SendRconCommand(ip);
}
stock GetHighestID(exceptof INVALID_PLAYER_ID)
{
        new 
0;
        for(new 
0MAX_PLAYERSi++) if(IsPlayerConnected(i) && != exceptof && hi;
        return 
h;

+REP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)