
   /* AMX Mod script.
   *
   * Admin_Bots
   * (c) Copyright 2003, Marlin
   * This file is provided as is (no warranties).
   *
   *  Script  is  meant  to  give players ability to control bots, and to
   reduce
   * necessity of admins presence
   *
   * The script provides:
   *
   *  Cvars:
   *   amx_bots_type 1 - plbot or joebot, 0 for joebot, 1 for plbot
   *  Commands:
   *
   *  Server commands:
   *    amx_kickbots    - Kick all Bots
   *    amx_addbotct    - Add a CT Bot
   *    amx_addbott     - Add a T Bot
   *    amx_killbots    - Kill all bots (JoeBot only)
   */
   #include <amxmod>
   #include <amxmisc>
   public kickbots() {
       if (get_cvar_num("amx_bots_type")==1){
           new bots[32], bnum
           get_players( bots , bnum, "d")
           new botsid
           for(new i = 0; i < bnum; ++i ) {
               botsid = get_user_userid(bots[i])
               server_cmd("kick #%d",botsid)
           }
       } else server_cmd("joebot kickbots|all")
   }
   public addbott() {
       if (get_cvar_num("amx_bots_type")==1)
           server_cmd("plb_add 1")
       else server_cmd("joebot addbot|1|2")
   }
   public killbots() {
       if (get_cvar_num("amx_bots_type")==1)
                   server_cmd("plb_killbots")
       else server_cmd("joebot endround")
   }
   public addbotct() {
       if (get_cvar_num("amx_bots_type")==1)
           server_cmd("plb_add 2")
       else server_cmd("joebot addbot|2|2")
   }
   public plugin_init() {
       register_plugin("Admin_Bots","0.9.4a","Marlin")
       register_clcmd("amx_kickbots","kickbots",ADMIN_MENU,"-  Kicks  All
   Bots")
       register_clcmd("amx_addbotct","addbotct",ADMIN_MENU,"-  Adds  a CT
   Bot")
       register_clcmd("amx_addbott","addbott",ADMIN_MENU,"-   Adds   a  T
   Bot")
       register_clcmd("amx_killbots","killbots",ADMIN_MENU,"-  Kills  all
   Bots")
       register_cvar("amx_bots_type","1")
       return PLUGIN_CONTINUE

   }
