
   /* AMX Mod script.
   *
   * Death Info Beams by SpaceDude
   * This file is provided as is (no warranties).
   *
   */
   #include <amxmod>
   #define TE_BEAMPOINTS 0
   new m_spriteTexture
   public death(){
      new killer_id = read_data(1)
      new victim_id = read_data(2)
      if (killer_id!=victim_id && killer_id) {
         new k_origin[3]
         new v_origin[3]
         get_user_origin(killer_id,k_origin)
         get_user_origin(victim_id,v_origin)
         message_begin(MSG_ONE, SVC_TEMPENTITY,{0,0,0},victim_id)
         write_byte( TE_BEAMPOINTS )
         write_coord(k_origin[0])
         write_coord(k_origin[1])
         write_coord(k_origin[2])
         write_coord(v_origin[0])
         write_coord(v_origin[1])
         write_coord(v_origin[2])
         write_short( m_spriteTexture )
         write_byte( 1 ) // framestart
         write_byte( 1 ) // framerate
         write_byte( 100 ) // life in 0.1's
         write_byte( 5 ) // width
         write_byte( 0 )  // noise
         if (get_user_team(killer_id) == 1) {// T
            write_byte( 255 )   // r, g, b
            write_byte( 0 )   // r, g, b
            write_byte( 0 )   // r, g, b
         }
         else {
            write_byte( 0 )   // r, g, b
            write_byte( 0 )   // r, g, b
            write_byte( 255 )   // r, g, b
         }
         write_byte( 100 )   // brightness
         write_byte( 0 )    // speed
         message_end()
      }
   }
   public plugin_precache()
      m_spriteTexture = precache_model("sprites/dot.spr")
   public plugin_init() {
      register_plugin("Death Info Beams","0.9","SpaceDude")
      register_event("DeathMsg","death","a")
   }
