Maybe he was getting ready for the zombie apocalypse.

A routine traffic stop turned into a whole lot more for three Brooklyn cops the other day when they say they found the driver armed to the teeth.

A Chevy Impala with overly tinted windows near Ralph Avenue and Bainbridge Street caught the eyes of patrolmen Ryan Galvin, Mark Xylas and Vaughan Ettienne at 5 p.m. Wednesday.

So they pulled it over -- and yes, New York State has laws that restrict just how dark car windows can be .

The driver, Harvey McManus rolled down the window -- and bam -- “a strong odor of marijuana” hit the trio, an NYPD report says.

McManus, 36, of Bed-Stuy, was ordered out of the vehicle after failing to produce registration and insurance paperwork.

That’s when things got interesting.

After arresting McManus, who has prior weapons and robbery charges, cops spotted a large hunting knife on the floor.

The 81 precinct Anti-Crime Unit cops searched the car further and made an eye-popping find:

  • a Pioneer Arms 9mm machine gun.
  • two high capacity magazines, one of which had 19 9mm rounds
  • 129 additional 9mm rounds
  • 40 .45 caliber rounds,
  • 14 .38 special rounds
  • two stun guns.

McManus was jailed and slapped with three weapons counts: criminal possession of a machine gun, a second loaded gun, and a defaced firearm.

And oh yeah -- that tint violation.