This sounds like a tough situation. With it being your best friend, and because he is involved in something illegal. You haven't said drugs, but seems like people get killed over that more than most things, especially in a disagreement or rip-off.
It's gonna be hard to have a somewhat peaceful life in these circumstances...always must be alert, and being paranoid goes with the territory. What I'm getting from your post is you are concerned something may happen while you're hanging out with your friend, even though you are not directly involved with the illegal activity. If your friend is a drug dealer (and I'm not saying he is), but maybe you guys get together and smoke a joint every now and then at your place. If that's the case, you are responsible for what goes on in your house, and you are responsible for your, and everyone else's safety in your house. That's the only place you have some control over what goes on. Outside the boundary of your house, on the street, there's not much you can do except to avoid places where trouble might happen. And avoid being with indiscrete people. If drugs are what's involved, very, very few people are discrete, and will get you in trouble.
You haven't said, but have implied, you are expecting some sort of confrontation in the near future with bad folks. You need to defend yourself in that event, and seek advice on guns. For the home, which is the only place you have some control, a pump shotgun gives a warning sound which most people recognize and heed. If you find yourself in a situation not of your making, (your friend is at your house and someone follows him to your place) and you see or hear trouble brewing, you can rack the shotgun from another room. If you have to use it, it is effective.
I do not recommend carrying a handgun unless you are going to take on the role of bodyguard for your friend. I would not want to be in such a situation. Take under advisement, if you do this and use the gun to scare them off, they will come after you and confront you when you are least expecting them.
Good luck, and do not carry a gun in this case unless you believe your life to be in imminent danger. I knew a guy once who thought someone was after him. He was involved in drugs. He took it seriously enough to leave town and went to Africa for merc training. He lasted three weeks and came home after he got sick with the trots. He found he didn't have a stomach for killing either, but he went there to learn how to, if he had to at some point in his life.
Les