SA-MP Forums Archive
Bot Attack - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Bot Attack (/showthread.php?tid=634915)



Bot Attack - Xportaler - 28.05.2017

Hello. My server is getting attacked by bots with name 100101010 just with 1 and with 0 inside.
Do you know how can i stop this ?
I was think to make something to check if players have in name just 0 and 1 ban! But can you tell me how can i do this script or.. to ban this bots


Re: Bot Attack - Astralis - 28.05.2017

There are many filterscripts, https://sampforum.blast.hk/showthread.php?tid=280974


Re: Bot Attack - Logic_ - 28.05.2017

^^ Too poorly written, make your own protection since it's very easy.


Re: Bot Attack - Xportaler - 28.05.2017

Give me any idea PLS how can i make it!
Please i need a basic script to protect my server


Re: Bot Attack - Abagail - 28.05.2017

If you mean they're connecting actual NPCs, you should simply add a validation check to ensure they're connecting locally. This can be done under OnPlayerConnect, for example:
pawn Код:
public OnPlayerConnect(playerid)
{
       if(IsPlayerNPC(playerid))
       {
            new local_playerIP[32];
            GetPlayerIp(playerid, local_playerIP, 32);

            if(strcmp(local_playerIP, "127.0.0.1", true) != 0)
                return Ban(playerid);
       }

       return true;
}



Re: Bot Attack - Xportaler - 28.05.2017

No No! I am not connecting NPC's on server but i want to ban players who come with the same ip and with name 0 and q (EXAMPLE 10101010101011101010)


Re: Bot Attack - Abagail - 28.05.2017

I'm pretty sure they're connecting as an NPC, you should at least try using what I've given. I'm 99% positive it'll fix this.


Re: Bot Attack - Xportaler - 28.05.2017

So this wont ban any player from others ?


Re: Bot Attack - Spmn - 28.05.2017

Quote:
Originally Posted by Abagail
Посмотреть сообщение
If you mean they're connecting actual NPCs, you should simply add a validation check to ensure they're connecting locally. This can be done under OnPlayerConnect, for example:
pawn Код:
public OnPlayerConnect(playerid)
{
       new local_playerIP[32];
       GetPlayerIp(playerid, local_playerIP, 32);

       if(strcmp(local_playerIP, "127.0.0.1", true) != 0)
             return Ban(playerid);
 
       return true;
}
I wouldn't put that code on my server. It'll literally ban every player.

Ontopic: limit how many players can connect from an IP (in X seconds)


Re: Bot Attack - Abagail - 28.05.2017

Quote:
Originally Posted by Spmn
Посмотреть сообщение
I wouldn't put that code on my server. It'll literally ban every player.

Ontopic: limit how many players can connect from an IP (in X seconds)
That's an accident from me, forgot to include an IsPlayerNPC check. Updated my original post. I'm 99% positive that the issue is bots connecting with ridiculous names than them connecting as a valid player, although I may be mistaken. This is what several released modifications do that you can find on several sites.