FBR's right. Cops can make stops in other jurisdictions and often do. Like FBR explained, they're sworn peace officers whether they're on or off the clock or in or outside of their jurisdictions. Even local or county cops get their law enforcement authority from the states in which their peace officer certifications are issued. They're actually compelled to make stops outside their jurisdictions if they see what they believe to be a felony crime in progress. They can use their own discretion about intervening in misdemeanor offenses. Some states and municipal jurisdictions have limitations on who can make traffic stops in specific local areas, but many more do not.

If the cops said "We're going to search your vehicle," and your friend who was pulled over didn't stop them, then they essentially had consent to search. They don't have to have very much on which to base probable cause, and the officers' word, even when they don't really have sufficient probable cause, nearly always stands up in court. They are definitely taking advantage of the element of surprise and fear--and few young people really know their rights well enough to protect themselves in such a situation. Did your friend have any other offenses on his record such as previous misdemeanors for possession or paraphernalia or DUI that might have made them suspicious? Do you know if your friend had anything like his pipe in plain sight?