Police saw Scott Hendry reverse into a parked car as he tried to turn the vehicle around on Harrington Street, on April 18, at 11.05pm.
Jenna Minton, prosecuting at Mansfield Magistrates’ Court, said he tried and failed to steer past the police car and got out ‘staggering’.
When he was asked to sit in the police car he ran off, but was stopped by another officer who was just arriving.
Hendry, aged 44, climbed onto the roof of the police car, cracking the front bumper and the windscreen, and putting dents into the roof.
He kicked out as he was being detained on the ground, hitting a female constable. Cannabis was found in his car.
He later told police he had been to a wedding reception and said he smoked the class B drug to help with his post-traumatic stress disorder.
The court heard he has a previous conviction for driving while unfit through drink in Germany, in 2018.
Hendry, of Avondale Road, Thornhill, Rotherham, admitted assaulting an emergency worker, possession of a class B drug, being in charge of a vehicle while unfit through drink, and criminal damage.
Morgan Hogarth, mitigating, said Hendry served in the military, in Bosnia, Kosovo and Iraq, for 10 years, before he was discharged in 2005.
While living in Germany, he was assaulted and sustained a bleed on the brain after he challenged a group of men behaving inappropriately towards his partner, magistrates heard.
He suffers from social anxiety and had not drunk in 12 months, Mr Hogarth said, adding Hendry injured his legs when coming down from the roof of the car. He received a 12 month community order with 20 rehabilitation days.
He was banned from driving for 18 months, but he was offered a rehabilitation course which will reduce the disqualification by 25 per cent if he completes it by April 2023.
He was also fined £120 and ordered to pay a £95 surcharge and £85 costs.