A man who ate a takeaway meal off the bonnet of a police car parked directly outside a police station has been fined.