My first question is why would you want to "hang out" with your friends who are engaging in sinful activity in your presence? See 1 Corinthians 6:14-18;
In 1 Timothy 5:22 Paul warns us not be partakers in other men's sins. The word partaker means to have fellowship with or in other words "hang out". By continuing to hang out with them while they sin, you give tacit approval to their behaviour. That's not right. Take a stand for Christ. Either stay and rebuke or let it be known that you cannot participate, even passively, in their sinful behaviour.
I hope you have found this helpful.