The district attorney’s office won the money in a settlement as part of a federal suit against the opioid epidemic.