
   /* AMX Mod script.
   *
   * (c) Copyright 2004, BouBou (c) DevProd.com
   * This file is provided as is (no warranties).
   *
   * SwissGamesCave Server
   */
   #include <amxmod>
   #include <dodxmod>
   new killers[33][4]
   new   body_part[8][]  =  {"Whole  Body","Head","Chest","Stomach","Left
   Arm","Right Arm","Left Leg","Right Leg"}
   public death_msg(id){
      if (get_cvar_float("amx_show_death_events")) {
         new killer = read_data(1)
         new victim = read_data(2)
         new weapon_data = read_data(3)
         if (killer != victim && killer){
            new  vorigin[3],  korigin[3],  weapon,  hitplace,  Vname[32],
   Kname[32], kmsg[200],wpn[32]
            get_user_attacker(victim,weapon,hitplace)
            get_user_origin(victim,vorigin)
            get_user_origin(killer,korigin)
            get_wpnname(weapon_data,wpn,31)
            killers[victim][0] = killer
            killers[victim][1] = get_user_health(killer)
            killers[victim][3] = get_distance(vorigin,korigin)
            get_user_name(killer,Kname,31)
            get_user_name(victim,Vname,31)
            format(kmsg,199,"DoD Death
   Events^n---------------------^n^nKiller:       %s^nKiller      health:
   %dhp^nVictim:    %s^nDistance:    %.2f    meters^nWeapon:   %s^nPlace:
   %s",Kname,killers[victim][1],Vname,float(killers[victim][3])         *
   0.0254,wpn,body_part[hitplace])
            //client_print(victim,print_console,kmsg)
            set_hudmessage(30,75,200,0.02,0.5,2, 0.1, 3.0, 0.02, 0.1, 1)
            show_hudmessage(killer,kmsg)
            show_hudmessage(victim,kmsg)
         }
      }
      return PLUGIN_CONTINUE
   }
   public plugin_init() {
      register_plugin("DoD Death Events","0.9.6","BouBou")
      register_event("DeathMsg","death_msg","a")
      register_cvar("amx_show_death_events","1")
      return PLUGIN_CONTINUE
   }
