SA-MP Forums Archive
Bot atack - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Bot atack (/showthread.php?tid=232024)



Bot atack - zdog - 26.02.2011

Hi!
I've got problems with my server!
An idiot is regularly sending invisible bots. They fill the server. At the moment they fill the server with 197 slots - only 3 players can connect.
solutions?


Re: Bot atack - 101 - 26.02.2011

pawn Код:
public OnPlayerConnect(playerid)
{
    if(IsPlayerNPC(playerid)) {
        new ip_addr_npc[64+1];
        new ip_addr_server[64+1];
        GetServerVarAsString("bind",ip_addr_server,64);
        GetPlayerIp(playerid,ip_addr_npc,64);
       
        if(!strlen(ip_addr_server)) {
            ip_addr_server = "127.0.0.1";
        }
       
        if(strcmp(ip_addr_npc,ip_addr_server,true) != 0) {
            // this bot is remote connecting
            printf("NPC: Got a remote NPC connecting from %s and I'm kicking it.",ip_addr_npc);
            Kick(playerid);
            return 0;
        }
        printf("NPC: Connection from %s is allowed.",ip_addr_npc);
    }
   
    return 1;
}
Maybe, this? Will work?


Re: Bot atack - woot - 26.02.2011

Theres nothing you can do against it, other than hoping the attacker will stop.


Re: Bot atack - zdog - 26.02.2011

Quote:
Originally Posted by 101
Посмотреть сообщение
pawn Код:
public OnPlayerConnect(playerid)
{
    if(IsPlayerNPC(playerid)) {
        new ip_addr_npc[64+1];
        new ip_addr_server[64+1];
        GetServerVarAsString("bind",ip_addr_server,64);
        GetPlayerIp(playerid,ip_addr_npc,64);
       
        if(!strlen(ip_addr_server)) {
            ip_addr_server = "127.0.0.1";
        }
       
        if(strcmp(ip_addr_npc,ip_addr_server,true) != 0) {
            // this bot is remote connecting
            printf("NPC: Got a remote NPC connecting from %s and I'm kicking it.",ip_addr_npc);
            Kick(playerid);
            return 0;
        }
        printf("NPC: Connection from %s is allowed.",ip_addr_npc);
    }
   
    return 1;
}
Maybe, this? Will work?
i will try... but is a invisible bot.. not npc..I hope to work that


Re: Bot atack - 101 - 27.02.2011

Quote:
Originally Posted by zdog
Посмотреть сообщение
i will try... but is a invisible bot.. not npc..I hope to work that
Well NPCs are kind-of invisible when you think about it, atleast in the slots.


Re: Bot atack - Unknown123 - 27.02.2011

Quote:
Originally Posted by 101
Посмотреть сообщение
Well NPCs are kind-of invisible when you think about it, atleast in the slots.
In "something with 'beit'" you can see the NPCs but you cant see the "Invisible Bots" in the list
So i guess it wont work
PS: Im using "something with 'beit'" for testing me Anti-Cheat, im not a N00B User


Re: Bot atack - Calgon - 27.02.2011

Quote:
Originally Posted by 101
Посмотреть сообщение
pawn Код:
public OnPlayerConnect(playerid)
{
    if(IsPlayerNPC(playerid)) {
        new ip_addr_npc[64+1];
        new ip_addr_server[64+1];
        GetServerVarAsString("bind",ip_addr_server,64);
        GetPlayerIp(playerid,ip_addr_npc,64);
       
        if(!strlen(ip_addr_server)) {
            ip_addr_server = "127.0.0.1";
        }
       
        if(strcmp(ip_addr_npc,ip_addr_server,true) != 0) {
            // this bot is remote connecting
            printf("NPC: Got a remote NPC connecting from %s and I'm kicking it.",ip_addr_npc);
            Kick(playerid);
            return 0;
        }
        printf("NPC: Connection from %s is allowed.",ip_addr_npc);
    }
   
    return 1;
}
Maybe, this? Will work?
Yeah, that's not going to work.

Attacking bots connect as normal players.


Re: Bot atack - 101 - 27.02.2011

Quote:
Originally Posted by Calg00ne
Посмотреть сообщение
Yeah, that's not going to work.

Attacking bots connect as normal players.
Ow, well sorry OP, I failed.


Re: Bot atack - SkizzoTrick - 28.02.2011

I do not know how the attacking bots are working but here might be a solution:

Check the IP of the bots or from the one who's sending them and Range Ban him...idk it might work


Re: Bot atack - Unknown123 - 28.02.2011

Quote:
Originally Posted by SkizzoTrick
Посмотреть сообщение
I do not know how the attacking bots are working but here might be a solution:

Check the IP of the bots or from the one who's sending them and Range Ban him...idk it might work
The bots is Invisible..

*You cant see their IP in log.
*You cant see them connect.
*You cant see them in the Player List.
*.................................................