If you have been friends for a long time try telling hm that you no longer want to smoke or drink, but you'd be happy to meet him for lunch, or maybe a hike/run, movie. If he isn't interested in meeting for anything other than to sell or use, then you are probably going to need to cut the friendship.