• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Filterscript] Anti-Bot (Anti-Multiple-Connections)
#1
Star 
~ANTI BOT V.1~



Why This?

This is Made for the servers which are getting attacked by Massive Connections ( Bot's) . Since i was requested To make this?in my discord DM So, I?have made this.



What This Contains?

A filterscript :p.



How is this helpful?

It bans the IP once there are 2/More?connections from a IP?(default. You can change it in the script)





What is IP? (Beginner's Question)

An?Internet Protocol address?(IP address) is a numerical label assigned to each device connected to a?computer network?that uses the?Internet Protocol?for communication.[1][2]?An IP address serves two principal functions: host or network interface?identification?and location?addressing.



How to install?

1) Download the script from the link below.

2) Add the AntiBot.amx into your filterscript folder

3) Add this line into your server.cfg?
Code:
filterscripts AntiBot


4) Run Your server.





Where Da links at?

1) PasteBin -?https://pastebin.com/JEewZh9v

2) GitHub -?https://github.com/RyderAsthana/Anti-Bot



=========REP ME IF IT HELPED YOU.========
Code:
OnPlayerConnect(playerid)

{

new PlayerName[25];

GetPlayerName(playerid, PlayerName, sizeof(PlayerName));

Ban(playerid);

printf("%s was Banned :p", PlayerName);

return 1;

}
  Reply
#2
https://pastebin.com/zzbzynuK
  Reply
#3
Thumbs Up 
(2019-05-20, 10:36 PM)rEf Wrote: https://pastebin.com/zzbzynuK



Thats just a better version of this script
Code:
OnPlayerConnect(playerid)

{

new PlayerName[25];

GetPlayerName(playerid, PlayerName, sizeof(PlayerName));

Ban(playerid);

printf("%s was Banned :p", PlayerName);

return 1;

}
  Reply
#4
(2019-05-23, 04:34 AM)RajatAsthana Wrote:
(2019-05-20, 10:36 PM)rEf Wrote: https://pastebin.com/zzbzynuK



Thats just a better version of this script



There's always more than one way to do something. May it be better or even longer, the job is done. The consistency and quickness of the job being done is what the difference.
a k i r a r | o h a n a

Creator of Downfall Roleplay | Client Support Expert? | Retired Developer n' Mapper

[Image: 8zsUx.png]

? Alex `Y_Less` Cole? ?

#TheInnerCircle





  Reply
#5
This is already included by default in the SA-MP server package LMAO.
  Reply
#6
(2019-05-24, 10:45 AM)Gravityfalls Wrote: This is already included by default in the SA-MP server package LMAO.



Yet people dont use the samp server package. They usually delete all the useless files (filterscript, Gamemodes) and use their own.
Code:
OnPlayerConnect(playerid)

{

new PlayerName[25];

GetPlayerName(playerid, PlayerName, sizeof(PlayerName));

Ban(playerid);

printf("%s was Banned :p", PlayerName);

return 1;

}
  Reply
#7
(2019-05-26, 08:15 AM)RajatAsthana Wrote:
(2019-05-24, 10:45 AM)Gravityfalls Wrote: This is already included by default in the SA-MP server package LMAO.



Yet people dont use the samp server package. They usually delete all the useless files (filterscript, Gamemodes) and use their own.



Not an excuse, and your code is even worse than the one included by default.
  Reply
#8
(2019-05-20, 10:36 PM)rEf Wrote: https://pastebin.com/zzbzynuK



I have to agree this is written better, it has less code, it's clean and doesn't waste performance.

It also doesn't throw any forced messages.



I would prefer that it called some function before kicking, like a `CallRemoteFunction` for `OnPlayerKicked(const playerid, const reason[]);` (this should be the default callback for any library to call for kicking, no need to make it overly complicated, also if the return value was 0 you would not kick the person and if it was 1 you would)



Simple things, that can make a huge difference to development.
Remember to always refer to J0sh as `J0sh...`



@ Networks/Servers

San Andreas Gaming Network (Owner/Founder)

San Andreas Gaming (Owner/Founder)

Grand Theft Cop's n Robber's (Owner)

Britannia Roleplay (Owner/Founder) [Retired]

Alpine RP (Owner/Founder)

Aluminium Network (Maintainer) [Disbanded]

AlphaDM (Tech Support) [Disbanded]



# Services

forum.open.mp (Forum Manager) (Formerly Burgershot.gg

open.mp (Member)



~ Languages/Frameworks

Pawn, C, C, C#, Javascript, Typescript, Lua, Python, Go, Rust, PHP, SQL,

Angular, React, Vue, Svelte, Laravel, Rocket
  Reply
#9
Also, from before the version included with the server:



https://github.com/pawn-lang/YSI-Include...looding.md
  Reply
#10
It's also not really a good idea to set 2 as the default value, since many people play together with their brother/sister/friend/whatever on the same server at the same time using the same Internet connection.
[Image: Sasinosoft.png]

  Reply
#11
(2019-06-21, 11:18 AM)Sasino97 Wrote: It's also not really a good idea to set 2 as the default value, since many people play together with their brother/sister/friend/whatever on the same server at the same time using the same Internet connection.



It's up to you how many connections you allow.
  Reply
#12
(2019-05-27, 12:11 PM)Y_Less Wrote: Also, from before the version included with the server:



https://github.com/pawn-lang/YSI-Include...looding.md

Ye I just wanted to post this :3
Using Pawn.CMD?

If you're doing so, this is the very first sign that you absolutely shouldn't utilize your all powerful P-Code knowledge in any of the scripting discussion topics.
  Reply
#13
The bots have the same ip, if you ban a bot you ban them all, you don't need to compare ip or something like that.
Code:
Discord: Marllun#6297
  Reply
#14
What if two legitimate people are playing from the same IP? I used to play SA-MP w/ my brother years ago. Wouldn't this trigger a false positive & ban the both of us?
[Image: c9CyzPf.png]
  Reply
#15
(2021-05-21, 11:31 PM)Chaprnks Wrote: What if two legitimate people are playing from the same IP? I used to play SA-MP w/ my brother years ago. Wouldn't this trigger a false positive & ban the both of us?

I'm answering after 4 years, I hope I'm not breaking the rules because I honestly didn't even read them.

Of course, if the maximum number of players on one ip address is set to 3, then 3 can play and 4 is kicked out of the server. It's just a simple example without even any message focusing on the ip address. I could have done it better myself.

 I am writing about my version.
  Reply


Forum Jump: