Pinellas County Sheriff's deputies say Joseph Pineda told employees Friday that he deserved free food, had just come from a sting and didn't have his wallet.
Workers called the police. Pineda initially ignored commands to show his hands but eventually surrendered at gunpoint.
Authorities said they found two fake police badges and a handgun in the center console of his car.
The 33-year-old was charged with impersonating a police officer and improper exhibition of a firearm.
He was being held in the Pinellas County Jail. Online jail records did not indicate whether he had an attorney.