
   /* AMX Mod script.
   *
   * (c) Copyright 2002-2003, RAV
   * This file is provided as is (no warranties).
   *
   * Required: ADMIN_LEVEL_A to use this command
   *
   * Changelog
   *
   * Version 1.1 - Initial Build
   * Version 1.2 - Added random glow
   * Version 1.3 - Added Sound on float
   *  Version  1.4  -  Rewrite  to  be AMX 0.9.x compatible and fixed few
   issues
   *
   * Usage: amx_float <authid, nick or #userid>
   */
   #include <amxmod>
   #include <amxmisc>
   public admin_float(id,level,cid) {
       if (!cmd_access(id,level,cid,2))
           return PLUGIN_HANDLED
       new arg[32]
       read_argv(1,arg,31)
       new player = cmd_target(id,arg,5)
       if (!player) return PLUGIN_HANDLED
       new origin[3], name[32]
       new red = random_num(50,255)
       new green = random_num(50,255)
       new blue = random_num(50,255)
       get_user_origin(player, origin)
       get_user_name(player, name , 31)
       origin[2] += 192
       set_user_origin(player, origin)
       new dweap[32], sweap[32], dnum
       get_user_weapons(player,dweap,dnum)
       for(new a = 0; a < dnum; ++a){
           get_weaponname(dweap[a],sweap,31)
           engclient_cmd(player,"drop",sweap)
       }
       engclient_cmd(player,"weapon_knife")
       set_user_rendering(player,kRenderFxGlowShell,red,green,blue,kRende
   rNormal,16)
       set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)
       show_hudmessage(0,"Admin has made %s float!",name)
       emit_sound(player,CHAN_ITEM,      "misc/humiliation.wav",     1.0,
   ATTN_NORM, 0, PITCH_NORM)
       console_print(id,"Client ^"%s^" float",name)
       return PLUGIN_HANDLED
   }
   public plugin_precache(){
       precache_sound( "misc/humiliation.wav")
       return PLUGIN_CONTINUE
   }
   public plugin_init() {
       register_plugin("Admin Float","1.4","Rav")
       register_concmd("amx_float","admin_float",ADMIN_LEVEL_A,"<authid,
   nick or #userid>")
       //register_cvar("RVS_adminfloat", "1.3",FCVAR_SERVER)
       return PLUGIN_CONTINUE
   }
