
   /* AMX Mod script.
   *
   * (c) Copyright 2002-2003, f117bomb
   * This file is provided as is (no warranties).
   */
   #include <amxmod>
   #include <amxmisc>
   /*
   * Usage: amx_maxspeed <authid, nick, @team or #userid> <speed>
   * Examples:
   * amx_maxspeed @CT 101             - sets Counter-Terrorists Max Speed
   to 101
   *
   * maximun speed depends on your sv_maxspeed setting
   */
   public admin_maxspeed(id,level,cid) {
       if (!cmd_access(id,level,cid,3))
           return PLUGIN_HANDLED
       new arg[32], arg2[8], name2[32]
       read_argv(1,arg,31)
       read_argv(2,arg2,7)
       get_user_name(id,name2,31)
       new Float:maxspeed = floatstr(arg2)
       if (arg[0]=='@'){
           new players[32], inum
           get_players(players,inum,"ae",arg[1])
           if (inum==0){
               console_print(id,"No clients in such team")
               return PLUGIN_HANDLED
           }
           for(new a=0;a<inum;++a) {
               set_user_maxspeed(players[a],maxspeed)
           }
           switch(get_cvar_num("amx_show_activity"))    {
               case    2:    client_print(0,print_chat,"ADMIN   %s:   set
   maxspeed all %s",name2,arg[1])
               case  1:    client_print(0,print_chat,"ADMIN: set maxspeed
   on all %s",arg[1])
           }
           console_print(id,"All clients have set maxspeed")
       }
       else {
           new player = cmd_target(id,arg,7)
           if (!player) return PLUGIN_HANDLED
           set_user_maxspeed(player,maxspeed)
           new name[32]
           get_user_name(player,name,31)
           switch(get_cvar_num("amx_show_activity"))    {
               case    2:    client_print(0,print_chat,"ADMIN   %s:   set
   maxspeed on %s",name2,name)
               case  1:    client_print(0,print_chat,"ADMIN: set maxspeed
   on %s",name)
           }
           console_print(id,"Client ^"%s^" has set maxspeed",name)
       }
       return PLUGIN_HANDLED
   }
   public plugin_init() {
       register_plugin("Admin Maxspeed","0.9.3","f117bomb")
       register_concmd("amx_maxspeed","admin_maxspeed",ADMIN_LEVEL_A,"<au
   thid, nick, @team or #userid> <speed>")
       return PLUGIN_CONTINUE
   }
