One of the standard perks of being a policeman in most jurisdictions is that you're allowed to take paid gigs off-hours as a security guard and use your gun and uniform, and in some cases your patrol car if it's assigned to you permanently as it is for many state police officers.
Cops do that all the time. A long time ago I had a part-time job doing security at a YMCA; on busy days we'd have off-duty police directing traffic. I talked with some of them, who said most of the cops take side jobs doing traffic or security. The department even had an official system for distributing the work.