Don't break the law, don't resist, listen to them, don't talk back, pull over right away.
Two seperate occasions? You need to pull your head out of your ass and wake up. You put yourself in the position to get a beat down whether it's because of your friends, what you were doing or how...