
   /* AMX Mod script.
   *
   * (c) Copyright 2002, OLO
   * This file is provided as is (no warranties).
   *
   */

   #include <amxmod>
   #include <amxmisc>
   #include <csstats>
   new bool:specmode[33]
   public show_position(id){
       if (specmode[id]){
           new name[32], data[8]
           new target = read_data(2)
           get_user_name(target,name,31)
           new pos = get_user_stats(target,data,data)
           set_hudmessage(255,255,255,0.02,0.9,2, 1.5, 3.0, 0.02, 5.0, 1)
           show_hudmessage(id,"%s's       rank       is       %d       of
   %d",name,pos,get_statsnum())
       }
       return PLUGIN_CONTINUE
   }
   public set_specmode(id){
       new arg[12]
       read_data(2,arg,11)
       specmode[id] = (arg[10]=='2') ? true : false
       return PLUGIN_CONTINUE
   }
   public client_connect(id){
       specmode[id] = false
       return PLUGIN_CONTINUE
   }
   public client_disconnect(id){
       specmode[id] = false
       return PLUGIN_CONTINUE
   }
   public plugin_init(){
       register_plugin("Spec. Rank Info.","0.9","default")
       register_event("TextMsg","set_specmode","bd","2&ec_Mod")
       register_event("StatusValue","show_position","bd","1=2")
       return PLUGIN_CONTINUE
   }
