
   /*  This  plugin  contains  commands  to  disable  changing  teams  in
   Counter-Strike */
   /* $Id: plugin_chooseteam.sma,v 1.4 2002/12/19 18:21:19 JustinHoMi Exp
   $ */
   /* converted to amx by justinhomi */
   #include <amxmod>
   #define ACCESS_RESTRICT ADMIN_CVAR
   #define MAX_TEXT_LENGTH 200
   new ChooseteamRestrict = 0;
   public admin_chooseteam(id,level) {
       if (!(get_user_flags(id)&level)){
               console_print(id,"[AMX]   You   have  no  access  to  that
   command.")
               return PLUGIN_HANDLED
           }
       if (read_argc() < 2){
               console_print(id,"[AMX]     Usage:    amx_chooseteam:    <
   1=disabled / 0=enabled >")
               return PLUGIN_HANDLED
       }
       new Text[MAX_TEXT_LENGTH];
       if (ChooseteamRestrict == 0) {
           ChooseteamRestrict = 1;
           format(Text,  MAX_TEXT_LENGTH,  "The  admin  has DISABLED team
   changing");
           centersay(Text,10,255,255,0);
       } else {
           ChooseteamRestrict = 0;
           format(Text,  MAX_TEXT_LENGTH,  "The  admin  has  ENABLED team
   changing");
           centersay(Text,10,255,255,0);
       }
       return PLUGIN_HANDLED;
   }
   public CheckMenu(id) {
       if (ChooseteamRestrict==1) {
           client_print(id,print_center,"Changing   teams   is  currently
   disabled.");
           return PLUGIN_HANDLED;
       }
       return PLUGIN_CONTINUE;
   }
   public centersay(string[],time,red,green,blue)
   {
       set_hudmessage(red,  green, blue, -1.0, 0.30, 0, 6.0, float(time),
   0.5, 0.15, 1)
       show_hudmessage(0,"%s",string)
       return PLUGIN_CONTINUE
   }
   public plugin_init() {
       register_plugin("Team Limits","0.8","yensid/JustinHoMi")
       register_concmd("amx_chooseteam","admin_chooseteam",ACCESS_RESTRIC
   T,"< 1=disabled / 0=enabled >");
       register_clcmd("chooseteam","CheckMenu");
       return PLUGIN_CONTINUE;
   }
