
   /* AMX Mod script.
   *
   * (c) Copyright 2002, LGBR
   * This file is provided as is (no warranties).
   *
   */
   #include <amxmod>
   public allies(id){
      if (!(get_user_flags(id)&ADMIN_SLAY)){
         client_print(id,print_console,"[AMX]  You have no access to that
   command")
         return PLUGIN_HANDLED
      }
      if (read_argc() < 2){
         client_print(id,print_console,"[AMX]  Usage: amx_allies < authid
   | part of nick >")
         return PLUGIN_HANDLED
      }
      new arg[32]
      read_argv(1,arg,31)
      new player = find_player("c",arg)
      if (!player) player = find_player("bl",arg)
      if (player){
         if (get_user_flags(player)&ADMIN_IMMUNITY){
            new imname[32]
            get_user_name(player,imname,31)
            client_print(id,print_console,"[AMX]    Client   ^"%s^"   has
   immunity",imname)
            return PLUGIN_HANDLED
         }
         client_cmd(player, "jointeam 1")
         new authid[16],name2[32],authid2[16],name[32]
         get_user_authid(player,authid2,15)
         get_user_authid(id,authid,15)
         get_user_name(player,name2,31)
         get_user_name(id,name,31)
         client_print(id,print_console,"[AMX]  Client  ^"%s^" switched to
   allies.",name2)
      }
      else{
         client_print(id,print_console,"[AMX]  Client with that authid or
   part of nick not found")
      }
      return PLUGIN_HANDLED
   }
   public axis(id){
      if (!(get_user_flags(id)&ADMIN_SLAY)){
         client_print(id,print_console,"[AMX]  You have no access to that
   command")
         return PLUGIN_HANDLED
      }
      if (read_argc() < 2){
         client_print(id,print_console,"[AMX]  Usage: amx_axis < authid |
   part of nick >")
         return PLUGIN_HANDLED
      }
      new arg[32]
      read_argv(1,arg,31)
      new player = find_player("c",arg)
      if (!player) player = find_player("bl",arg)
      if (player){
         if (get_user_flags(player)&ADMIN_IMMUNITY){
            new imname[32]
            get_user_name(player,imname,31)
            client_print(id,print_console,"[AMX]    Client   ^"%s^"   has
   immunity",imname)
            return PLUGIN_HANDLED
         }
         client_cmd(player, "jointeam 2")
         new authid[16],name2[32],authid2[16],name[32]
         get_user_authid(player,authid2,15)
         get_user_authid(id,authid,15)
         get_user_name(player,name2,31)
         get_user_name(id,name,31)
         client_print(id,print_console,"[AMX]  Client  ^"%s^" switched to
   axis.",name2)
      }
      else{
         client_print(id,print_console,"[AMX]  Client with that authid or
   part of nick not found")
      }
      return PLUGIN_HANDLED
   }
   public plugin_init(){
      register_plugin("Day Of Defeat Frontend","0.0","LGBR")
      register_clcmd("amx_allies","allies",ADMIN_KICK,"amx_allies       <
   authid | part of nick >")
      register_clcmd("amx_axis","axis",ADMIN_KICK,"amx_axis  <  authid  |
   part of nick >")
      return PLUGIN_CONTINUE
   }
