
   // Spectator Block for DoD by Maxim
   //
   // Simple plugin to disable the Spectator team
   // while allowing administartors to spectate
   // without a hitch.
   //
   // Admins must have ADMIN_RESERVATION (Flag "b")
   //
   // amx_spectatorblock 0|1     0 Off, 1 On
   //
   #include <amxmod>
   public admin_check(id, level, cid) {
      if            (!(get_user_flags(id)&ADMIN_RESERVATION)           &&
   (get_cvar_num("amx_spectatorblock") == 1)){
         client_print(id,print_chat,"* Spectator has been disabled")
         new sTeam[10]
         get_user_info(id,"team",sTeam,9)
         if (equal(sTeam,"")) client_cmd(id,"changeteam")
         return PLUGIN_HANDLED
      }
      return PLUGIN_CONTINUE
   }
   public plugin_init() {
           register_plugin("Spectator Block for DoD", "1.1", "Maxim")
           register_clcmd("jointeam 3", "admin_check")
           register_cvar("amx_spectatorblock","1")
           if       (get_cvar_num("mp_allowspectators")       ==       0)
   set_cvar_num("mp_allowspectators",1)
           return PLUGIN_CONTINUE
   }
