
   /* AMX Mod script.
   *
   *  Announces  Head Shots at location of killer and victim hears 'I bet
   that stings a little' sound
   *  by {OmNi}Eternal (eternal@clanomni.net)
   *
   *  Modifed from JustinHoMi's KnifeKill
   *  Headshot messages from StatsME
   */
   // Edit by thomas aka -]ToC[-blah blah blah
   #include <amxmod>
   #define MESSAGES   6
   new headshots[33]
   new messages[MESSAGES][] = {
   "%s killed %s with a well placed shot to the head!",
   "%s removed %s's head!",
   "%s turned %s's head into pudding!",
   "%s pwns %s head!",
   "%s turned %s's head into red jello",
   "%s has superb aim as %s well knows..."}
   public deathmsg(){
      new killer = read_data(1)
      new victim = read_data(2)
      new headshot = read_data(3)

      headshots[victim] = 0

      if (killer == 0)  //if attacker is a bomb
         return PLUGIN_CONTINUE

      if (!headshot) {
          headshots[killer] = 0
          return PLUGIN_CONTINUE
      }

      if (!headshots[killer]) {
          headshots[killer] = 1
      } else {
          headshots[killer]++
      }

      new killer_name[32], victim_name[32]
      get_user_name(read_data(1),killer_name,31)
      get_user_name(read_data(2),victim_name,31)
      set_hudmessage(200, 50, 0, -1.0, 0.20, 0, 6.0, 6.0, 0.5, 0.15, 3)
      show_hudmessage(0,messages[                random_num(0,MESSAGES-1)
   ],killer_name,victim_name)
      new parm[2]
      parm[0] = killer
      parm[1] = headshots[killer]
      set_task(0.0,"hs_sound",0,parm,2)

      return PLUGIN_CONTINUE
   }
   public hs_sound(parm[]){
       emit_sound(parm[0],CHAN_VOICE,"misc/headshot.wav", 1.0, ATTN_NORM,
   0, PITCH_NORM)
       parm[1]--
       if (parm[1] > 0) {
           new Float:repeat_speed = get_cvar_float("amx_hsreapeatspeed")
           if (repeat_speed <= 0.0)
               return PLUGIN_CONTINUE
           set_task(repeat_speed,"hs_sound",0,parm,2)
       }
       return PLUGIN_CONTINUE
   }
   public plugin_precache(){
       precache_sound("misc/headshot.wav")
       return PLUGIN_CONTINUE
   }
   public plugin_init(){
       register_plugin("Head        Shot       Locational       Announcer
   v2","0.9","blahblahblah")
       register_cvar("amx_hsreapeatspeed","0.25")
       register_event("DeathMsg","deathmsg","a")
       return PLUGIN_CONTINUE
   }
