SpecBot 2021
1 Attachment(s)
Hi! I was looking a lot for a spec bot plugin that was not detected as "bots" but most of them crashed the server, so I created one with a friend and i want to share it with you. (yes, i know there are many plugins but none of it worked like this without crashing the server).
The plugin is writed using amx 1.9. Credits: ideea from the internet - written by me and SendOreos General information: The plugin simply adds 3 bots to the spec (the names of the bots are custom via cvars) that never joins the team. They will disconnect and reconnect automatically. (one at a time). More informations here (english soon): click Cvars: bs_enable "0/1" - enable / disable the plugin bs_botname "name1" - name of the first bot bs_botname2 "name2" - bot of the second bot bs_botname3 "name3" - bot of the third bot bs_maxplayers "5-29" - when to disconnect, disconnect happens at the number +1 and reconnects at -1 (ex. 28 online players, only 1 bot will connect, when the 29 player connect the bot will disconnect). |
Re: SpecBot 2021
Plugins of this sort typically get get trashed or unapproved.
|
Re: SpecBot 2021
Quote:
|
Re: SpecBot 2021
Everyone give the help to others on this forum but we in 2022, we should make plugin with optimized code.
I did search and i found much plugin for spec bot with more features P.s: We don't mean to give bad feedback but we are trying to do our best for this game. - I learned something from some scripter's here: Why we creating plugin has like 1000 line using hard coded and we can create it with less lines like 300 with more feature with optimizing the code. |
Re: SpecBot 2021
Quote:
Anyway, im open to optimize the code, im waiting for proposals. |
Re: SpecBot 2021
Quote:
When i have time i will create this plugin with many features with code optimized |
Re: SpecBot 2021
Quote:
Please, stop replying unless you come with something for the code. :down: |
Re: SpecBot 2021
That plugin may be from 2016 but this one looks like it was coded in the early 2000s.
Apart from you using this as an obvious advertisement, the code can use tons of improvements. The main problem is using repetitive code everywhere. All of this can be handled with a simple loop. I'd give this plugin max 30 lines of actual code, excluding the plugin registration stuff. You're limiting the entire plugin for AMXX 1.9+ because of one line of code that can easily be made compatbile with older versions. You're also limiting your plugin to exactly 3 bots when you can do this the non-hardcoded way and allow for full flexibility. You have a non-functioning cvar "bs_enable" because you're getting its value in plugin_init(). Cvars are read in plugin_cfg() which is executed after plugin_init(). Apart from that, there are many minor things that can be worked on: Code:
Why is just the first variable a boolean? Why do you even have a separate variable for each bot? Code:
Since when do variables get saved on map change? Code:
Why 60 seconds and not when a player joins/leaves? Code:
The maximum name length is 32. Also, why the separate variables when you can just override the first one? Code:
Why would you use kick with the name instead of the bot's id? What happens if a player decides to use one of the bots' names? Code:
"bot_on" should be checked first. There's no reason to call any natives if the variable didn't pass the logical test. Code:
Why the need to keep calling the same function over and over again? You already got the number the first time, just add +1 and reuse it. Code:
You're not using the message, why get it in the first place? And last, but not least, what happened to the author's name? If you're going to use someone else's code you should give credits for it. |
Re: SpecBot 2021
Quote:
Respect any feedback and ask for the point who type a bad feedback of view, anyway good luck. |
Re: SpecBot 2021
Maybe you understood me wrong, anyway, the idea is that gametrackers doesn't allow more than 3 bots, so that's why we added only 3. We are using this bot plugin and auto join and we don't have problems, the bot's stays on spec.
P.S: on our forum we don't support english, so i don't think there is a really advertisement (it doesn't help us). Thanks for the feedback, we will come with an update in 2022 January. Happy hollydays! :bee: |
All times are GMT -4. The time now is 17:20. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.