We've all seen drive-by shooting in gang-based videogames and films. Even mob crews use to drive past rival mob crews and businesses and light up the place with submachine guns as they drive by in unmarked cars with dark tints.
A drive by mechanism would require the passenger to shoot at "something" using either an automatic or semiautomatic firearm and from there, the shooting mechanics would imitate distance shooting currently used by handguns and rifles when they shoot in adjacent rooms. I.e. people would have a chance to dodge, the shooter would have a chance to miss.
The window would have to be rolled down, so people outside can view the face of the shooter.