
   /*********************************************************************
   ******
   * amx_ejl_personalgavity.sma     version 1.2  Date: 12/24/2002
   *  Author: Eric Lidman      ejlmozart@hotmail.com
   *  Alias: Ludwig van        Upgrade:
   http://lidmanmusic.com/cs/plugins.html
   *
   *  Just  a  silly plugin to change the gravity of one player or a team
   instead
   *  of for the whole server.
   *
   * COMMANDS:
   *
   *    amx_grav  <part of nick or @ team> <percentage of server gravity>
   [drop]
   *
   * EXAMPLES OF ACTUAL USAGE:
   *
   *    amx_grav  Lud  50     --- gives Lud 400 gravity if normal gravity
   is on
   *    amx_grav  Lud -1 drop   --- gives Lud negative gravity and shoots
   him to
   *                               the  upmost  limits  of  the  map then
   makes him
   *                               drop  his  weapons too (thus it can be
   used
   *                               as  a  punishement  command,  not just
   fun).
   *    amx_grav  @  TERRORIST  -100  drop  --- sends the whole terrorist
   team up
   *                                        into  the  sky and makes them
   drop
   *                                        all thier weapons
   *
   **********************************************************************
   ****/
   #include <amxmod>
   #include <amxmisc>
   public admin_grav(id,level,cid){
       if (!cmd_access(id,level,cid,3))
           return PLUGIN_HANDLED
       new grav[12]
       new Float:igrav
       new aname[32]
       new arg1[12]
       new drop[16]
       read_argv(1,arg1,12)
       if (equal(arg1,"@")){
           new players[32], inum, teamname[32]
           read_argv(2,teamname,32)
           read_argv(3,grav,12)
           read_argv(4,drop,16)
           igrav = str_to_num(grav) * 0.01
           if(igrav == 0.0)
               igrav = -1.0
           get_players(players,inum,"e",teamname)
           for(new i = 0 ;i < inum ;++i){
               set_user_gravity(players[i],igrav)
               if(igrav < 0){
                   client_cmd(players[i],"+jump")
                   set_task(1.0,"delayed_jmp_rst",0,players[i],1)
               }
               if(equali(drop,"drop",4)){
                   engclient_cmd(players[i],"drop")
                   engclient_cmd(players[i],"drop")
                   engclient_cmd(players[i],"drop")
               }
           }
           if (inum){
               get_user_name(id,aname,32)
               console_print(id,"[AMX]   All  clients  from  ^"%s^"  team
   gravity has been set",teamname)
               client_print(0,print_chat,"[AMY]  %s  used
   command  amx_grav %s %s",aname,teamname,grav)
               log_message("[AMY]  %s  used      command     amx_grav  %s
   %s",aname,teamname,grav)
           }else{
               console_print(id,"[AMX] No clients in such team")
           }
       }else {
           new name[32]
           read_argv(1,name,32)
           read_argv(2,grav,12)
           read_argv(3,drop,16)
           igrav = str_to_num(grav) * 0.01
           if(igrav == 0.0)
               igrav = -1.0
           new player = cmd_target(id,name,3)
           if (!player) return PLUGIN_HANDLED
           set_user_gravity(player,igrav)
           get_user_name(player,name,32)
           get_user_name(id,aname,32)
           console_print(id,"[AMX]   Client   ^"%s^"   gravity  has  been
   set",name)
           client_print(0,print_chat,"[AMY]  %s  used   command  amx_grav
   %s %s",aname,name,grav)
           log_message("[AMY]  %s  used        command       amx_grav  %s
   %s",aname,name,grav)
           if(igrav < 0){
               new splayer[1]
               splayer[0] = player
               client_cmd(player,"+jump")
               set_task(1.0,"delayed_jmp_rst",0,splayer,1)
           }
           if(equali(drop,"drop",4)){
               engclient_cmd(player,"drop")
               engclient_cmd(player,"drop")
               engclient_cmd(player,"drop")
           }
       }
       return PLUGIN_HANDLED
   }
   public delayed_jmp_rst(playa[])
   {
       client_cmd(playa[0],"-jump")
   }
   public plugin_init()
   {
       register_plugin("Admin Personal Gravity","1.2","EJL")
       register_concmd("amx_grav","admin_grav",ADMIN_SLAY,"< part of nick
   > or < @ team > < gravity > [<drop> optional drop weapons]")
       return PLUGIN_CONTINUE
   }
