Page 1 of 1

Kill Bots - kills bots when all humans are dead

Posted: Mon Nov 22, 2021 11:40 pm
by greenie
amx_killbots_cmd <-- command used to kill the bots. It is executed when the last human player dies.
amx_killbots_cmd_addt <-- command used to add a Terrorist bot. Executed to establish teams.
amx_killbots_cmd_addct <-- command used to add a CT bot. Executed to establish teams.
amx_killbots_cmd_remt <-- command used to remove a Terrorist bot. Executed to establish teams.
amx_killbots_cmd_remct <-- command used to remove a CT bot. Executed to establish teams.
amx_rembots_bykick <-- if set to 1, the cmd set in amx_killbots_cmd_rem(c)t is ignored and the bots are simply kicked.

amx_killbots_teamsize <-- number of players per team - e.g. if set to 5, the script will try to establish a 5on5 game.

amx_killbots_enable <-- enables / disables killing of the bots.
amx_killbots_enableadd <-- enables / disables adding & removing of bots.

amx_killbots_ignorebomb <-- if set to 0 (off), bots will not be killed after the bomb was planted, so they will be able to defend / defuse it.

amx_killbots_now <-- exec this to kill the bots immediately no matter if bomb was planted or not.
amx_addbott_now <-- adds a T bot to the game. Warning: if team management is on, this bot maybe removed next round start!
amx_addbotct_now <-- adds a CT bot to the game.
amx_rembott_now <-- removes a T bot from the game.
amx_rembotct_now <-- removes a CT bot from the game.
CONFIG:
the commands to kill, add and remove the bots immediately just execute the commands you specified in the CVars. If you enabled remove by kick, the remove commands will kick your bots and not try to exec the cmds.


TEAM MANAGEMENT:
On every round start, the script checks how many players there are in each team. If the player count differs from the value given in the CVar "amx_killbots_teamsize", the script tries to compensate these differences by adding / removing bots. If the team has "too many" players with no bots, the script can't help it so nothing will happen.
The removing methods depend on what you set in the cvars. Usually, the script will execute the specified command and hope that this solved the problem. If you enabled "remove by kick", the script asks the server to kick a few players known as bots. If this works mainly depends on you to set the right cvar settings.


TESTED:
This whole script was tested with JoeBot (that is why the default CVars are JoeBot commands), but I think it should work with any other bot as well if the right commands are specified. You can change all the CVars' names and defaults without having to edit the whole script, just edit the #defines on the top few lines and recompile. You can even edit the format of the HUD messages by only editing a #define.


LANGUAGES:
I used a dictionary for the HUD messages. If anyone translated parts of it into their native language, please send me. I will update this thread so everyone can use it. The languages currently supported are English and German.

get plugin