
   /* AMX Mod script.
   *
   * (c) Copyright 2002, OLO
   * This file is provided as is (no warranties).
   *
   */
   #include <amxmod>
   new friend[33]
   public set_team(id)
       friend[id] = read_data(2)

   public hide_status(id){
       set_hudmessage(0,0,0,0.0,0.0,0, 0.0, 0.01, 0.0, 0.0, 4)
       show_hudmessage(id,"")
   }
   public show_status(id){
       new name[32],pid = read_data(2)
       get_user_name(pid,name,31)
       if (friend[id] == 1){ /* friend */
           new clip, ammo, wpnid = get_user_weapon(pid,clip,ammo)
           new wpnname[32]
           get_weaponname(wpnid,wpnname,31)
           set_hudmessage(0,50,255,-1.0,0.60,1, 0.01, 3.0, 0.01, 0.01, 4)
   /* blue */
           show_hudmessage(id,"%s -- %d HP / %d AP / %s",name,
               get_user_health(pid),get_user_armor(pid),wpnname[7])    /*
   wpnname[7] - trunk weapon_ */
       }
       else {
           set_hudmessage(255,50,0,-1.0,0.60,1, 0.01, 3.0, 0.01, 0.01, 4)
   /* red */
           show_hudmessage(id,name)
       }
   }

   public plugin_init(){
       register_plugin("Player Name","0.9.2","default")
       register_event("StatusValue","set_team","be","1=1")
       register_event("StatusValue","show_status","be","1=2","2!0")
       register_event("StatusValue","hide_status","be","1=1","2=0")
       return PLUGIN_CONTINUE
   }
