Breathe. If he can’t talk to you when you’re both around his friends, then I have to ask, why is it that you like him? I wouldn’t want to give so much emotional energy to someone who is nice only when it’s convenient for him. Don’t be one of those people who pines for the unattainable (emotionally or otherwise) person, or any person who, for whatever reason, isn’t responding positively to your interest. Its a waste of time and a drain on your self-esteem. Just be cordial when he speaks to you, and keep going. There’s a guy out there who you’ll like, who likes you and will be open about it.