Day of Defeat Plugins Community
This site is an archive — everything is readable and downloadable, nothing can be posted. Admin

Bot Disabler

by pepedfh · 2008-11-24 · 7 replies · 3692 views · 6 downloads

Read the thread (8 posts)

From the first post

I installed the ShrikeBot Disabler plugin by Toolz. Does work, but seems to not be consistent when players enter and leave. First of all, I would think that if you have the it set to 12 in the script. Then when 6 players are in, you would still have 6 bots left. But does not work that way. When 4 players enter, all bots leave. Sometimes when 3 players enter all bots leave. Does anyone have any suggestions as to how I can stablize the bots? Any help will be appreciated... thanks in advance... Below is the script for this pluging:
rn
rn /*
rn DoD ShrikeBot Disabler
rn Brought to you by TooLz
rn
rn Thanks to DoDPlugins.net for making it all possible!
rn*/
rn#include
rn#include
rnnew PlayerCount
rnpublic plugin_init(){
rn register_plugin("DoD Shrikebot Disabler","1.0","TooLz")
rn register_cvar("dod_shrikebot_maxbots","16")
rn}
rnpublic client_authorized(id){
rn if(!is_user_bot(id)){
rn PlayerCount++
rn if(PlayerCount >= get_cvar_num("dod_shrikebot_maxbots")){
rn server_cmd("shr ^"max_bots 0^"")
rn return PLUGIN_CONTINUE
rn }
rn }
rn return PLUGIN_CONTINUE
rn}
rnpublic client_disconnect(id){
rn if(!is_user_bot(id)){
rn PlayerCount--
rn if(PlayerCount < get_cvar_num("dod_shrikebot_maxbots")){
rn server_cmd("shr ^"max_bots %d^"",get_cvar_num("dod_shrikebot_maxbots"))
rn return PLUGIN_CONTINUE
rn }
rn }
rn return PLUGIN_CONTINUE
rn}
rn
rn
rnthanks again,
rnpepedfh

Added later in the thread

avamods_maxbots.sma Plugin Source 938 B 6 dl Download Compile

The thread

All 8 posts from 5 people on Bot Disabler, kept as they were written.

P pepedfh
started this thread
Posts: 5
Threads: 1
Joined: Aug 2007
11-23-2008, 09:12 PM #1

I installed the ShrikeBot Disabler plugin by Toolz. Does work, but seems to not be consistent when players enter and leave. First of all, I would think that if you have the it set to 12 in the script. Then when 6 players are in, you would still have 6 bots left. But does not work that way. When 4 players enter, all bots leave. Sometimes when 3 players enter all bots leave. Does anyone have any suggestions as to how I can stablize the bots? Any help will be appreciated... thanks in advance... Below is the script for this pluging:rnrn /*rn DoD ShrikeBot Disablerrn Brought to you by TooLzrnrn Thanks to DoDPlugins.net for making it all possible!rn*/rn#include <amxmodx>rn#include <amxmisc>rnnew PlayerCountrnpublic plugin_init(){rn register_plugin("DoD Shrikebot Disabler","1.0","TooLz")rn register_cvar("dod_shrikebot_maxbots","16")rn}rnpublic client_authorized(id){rn if(!is_user_bot(id)){rn PlayerCount++rn if(PlayerCount >= get_cvar_num("dod_shrikebot_maxbots")){rn server_cmd("shr ^"max_bots 0^"")rn return PLUGIN_CONTINUErn }rn }rn return PLUGIN_CONTINUErn}rnpublic client_disconnect(id){rn if(!is_user_bot(id)){rn PlayerCount--rn if(PlayerCount < get_cvar_num("dod_shrikebot_maxbots")){rn server_cmd("shr ^"max_bots %d^"",get_cvar_num("dod_shrikebot_maxbots"))rn return PLUGIN_CONTINUErn }rn }rn return PLUGIN_CONTINUErn}rnrnrnthanks again,rnpepedfh

H h0_noMan
posted here
Posts: 80
Threads: 11
Joined: Dec 2007
11-23-2008, 09:50 PM #2

Dont change the value directly in the script.nJust change the value in the server.cfg or by the server console or even with amx_cvar.nnamx_cvar dod_shrikebot_maxbots 12

P pepedfh
started this thread
Posts: 5
Threads: 1
Joined: Aug 2007
11-23-2008, 10:58 PM #3

Thanks Ho noman... Appreciate the response...rnrnpepedfh

{DwP} 325th ABN
posted here
Posts: 231
Threads: 12
Joined: Aug 2006
11-24-2008, 08:36 PM #4

you should look into this menu in game for the bots also. syn made it i love it, gives you in game menu like your admin menu. can take bots out bring them in number them and all kinds of goodies. it is a must for taking away the get out of game set bots etc bs.rnrnrnhttps://www.dodplugins.net/forums/showthread.php?t=1147&highlight=bot+menu

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
11-24-2008, 08:56 PM #5

im not a fan of using client_authorized and client_disconnect to ++ or -- a variable when it comes to counting players...nyou tend to get an inaccurate player count.nnnyou can try the plugin i attached...nnn* to set your default max_bots setting for the plugin, open the file and edit the MAXBOTS define on line #9

F Fysiks
posted here
Posts: 108
Threads: 3
Joined: Aug 2007
11-30-2008, 02:42 PM #6

Why don't you just use shrikebot to kick bots?rnrnIf you set "max_bots 10" & "min_bots 0":rnrn2 players + 8 botsrn4 players + 6 botsrn8 players + 2 botsrn10+ players + 0 botsrnrnAlso, if you use "kick_all_bots 8" in addition:rnrn2 players + 8 botsrn6 players + 4 botsrn8+ players + 0 botsrnrnThese work great for me. Both on linux (patched) and windows.

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
11-30-2008, 06:09 PM #7

well it says why in the thread for the original plugin being discussed here...nnn

The problem with Shrikebot is that there is a loop, constantly checking to see if the max_bots has been met, even if there are 10 people in the server, and I have my max_bots set to 6, it still runs that loop every 10 seconds to see if it should bring in bots yet, so I made it easier, turn the loop off with a plugin until it needs to be turned back on..
nnnnbut i did realize the other day that i should include the kick_all_bots junk in the code i posted :P

P pepedfh
started this thread
Posts: 5
Threads: 1
Joined: Aug 2007
12-02-2008, 03:30 PM #8

Thanks guys, will take all into consideration... Looks like any of these will definitely work for our server. Thanks again for the great suggestions and quick response.rnrnpepedfh

DoD Plugins Archive · Repository · Old Forum Threads · Maps · Admin · built 14 Sep 2026 00:34 UTC