Well, the title kind of says it all. What buttons/levers/doo-dads must one push to request a ride from a teammate driving a vehicle? Quite thankful for info, /Me
It's the little button with the circle and vertical line on the front of your console, alt+f4 or the button on PC.
Only shoot it if its heavy armor such as a sundy about to leave after a base cap. Light armor vehicles might get pissed when you shoot them for a ride. But if you hold down your "spot" key you get advanced options such as requesting a ride or changing access to things as a builder of object you look at (if you own it).
For what it's worth, I did intend the subtle implication that they should play PC ... Anyway, yes, hailing your ride down with machinegun fire is the classic solution.