Former Tampa Bay Lightning player Ryan Malone pleaded no contest Tuesday to driving under the influence and agreed to enter pretrial intervention program on a cocaine possession charge.

Malone was adjudicated guilty for DUI and then sentenced to 12 months probation, a Hillsborough County court spokesman said. He must attend DUI school and perform 50 hours of community service.

Should he complete the pretrial program, the drug charge would be dismissed.

Malone was arrested in Tampa on April 12 after a police officer saw him weaving in a 2014 Chevrolet Suburban on Platt Street, authorities said.

Malone, 34, of Tampa, refused to perform the field sobriety test after he was pulled over by the officer, authorities said. The officer searched Malone and found a small bag of cocaine in his right back pocket, according to the arrest report.

Malone’s blood-alcohol level was 0.116 and 0.112, police said. In Florida, the legal limit for driving is 0.08.

The Lightning bought out the remaining year of Malone’s seven-year, $31.5 million contract in June, freeing up $4.5 million against the NHL salary cap.