
   /* AMX Mod script.
   *
   * Damage Frags 0.2
   *  by SniperBeamer
   *
   * Description
   *  You don't get frags by kills.
   *  Every 100 HP damage you get one frag.
   *
   */
   #include <amxmod>
   new g_Damage[33]
   public plugin_init()
   {
       register_plugin("Damage Frags","0.2","SniperBeamer")
       register_event("Damage","eDamage","b","2!0")
   }
   public client_connect(id)
   {
       g_Damage[id] = 0
   }
   public eDamage(id)
   {
       new attacker = get_user_attacker(id)
       new damage = ( read_data(2)>100 ) ? 100 : read_data(2)
       if ( id!=attacker && get_user_team(id)!=get_user_team(attacker) )
       {
           g_Damage[attacker] += damage
           set_user_frags(attacker,floatround(g_Damage[attacker]/100.0))
       }
       else
       {
           g_Damage[attacker] -= damage
           set_user_frags(attacker,floatround(g_Damage[attacker]/100.0))
       }
       return PLUGIN_CONTINUE
   }
