Essentially, you're usually in the clear using your weapon if there is an immediate┬*risk to the life of yourself or others
. It gets much dicier when you start defending property
- too many juries that have swallowed the propaganda of "just give them what they want and they won't hurt you."
You want to study up on force escalation- physical force, deadly force, etc.
But for the situation you are describing here, your gun is not your best weapon. Your gun should be reserved for the defense of your person. Other tools will be more effective┬* at solving your problem without landing you in prison.
Keep a notebook. Detail every time you smell pot, where it is coming from, the date, time, descriptions of the people you see. Take a photo is possible. Keep it brief, to the point, detailed enough to be precise if you have to testify in court. Date and time for every entry.┬*This will be admissable evidence and you will almost certainly┬*be allowed to refer to it in court. (IANAL, but I have been a security guard in the┬*distant past, and I do computer security now.)┬*If you don't have your notebook with you during an incident, note the details ASAP after the fact, noting the time the incident occured, and the time when you are writing it down.
Don't make threats or value judgements in your notebook. Don't use it as a diary of your feelings.┬*Just the facts, man. Don't give up your notebook uness it is being admitted to evidence in a court. If cops would like the info in it, make photocopies and keep the original in your posession.
Honestly, this sounds tedious, but it is the most important and easiest thing out of all my advice. It is the same advice I have given to friends who are going through a divorce. The ones who did it prospered, the ones who didn't, got screwed.
Contact your landlord, and complain about any security problems (broken doors/windows, locks) in writing with copies. Note all of this in your notebook. Report any code violations that are not fixed ASAP. Talk to the Better Business Bureau if you don't get cooperation from the landlord (largely futile, I know; but it's easy enough to do and it might help you or someone else down the line.)
Get to know your neighbors, see if you can get them to help identify the perpetrators. Let them know you're keeping the notebook, and encourage the upstanding ones to do the same.
Take pictures or video. Wear your sidearm if necessary while doing so. Make it obvious you are getting identification of the bad guys. Get somebody to help you do this- they won't be so bold if there are two or more of you.┬* Ths goes along with getting to know your neighbors, even a forming a neighborhood watch, if you can.
When you call 911, tell the dispatcher you are going to confront the perp- DO NOT make threats about using a weapon against them- you do not want to have evidence that might be considered premeditation or intent to harm or kill someone. Telling them you are confronting the perp will get a faster response as there is a possibility of violence, which is more exciting for the cops than a B&E with the perp gone, no evidence, and no really big money involved.
Write a letter to your local newspaper outlining the crime problem and lack of responsiveness of police- the papers love to beat on cops. Bureacracies such as police departments also respond to public censure.
Most of all, take any small positive step you can, rather than letting frustration get the best of you. Don't do anything stupid. Good luck.