system
A chat on subreddit /r/NoStupidQuestions
human
Knowing what they’re allowed to do isn’t particularly helpful in the moment. 

You cannot, legally or practically, prevent an illegal search. All you can do is fight it in court later. If they find something then you may be able to prevent the evidence from being used against you. If they damage something then there’s some small chance you could get compensation. But you can’t lock your door or run away just because they want to perform an illegal search. 

What you can and should do is refuse to consent to any search. If you consent, then it’s legal no matter what. If they have probable cause for a search, they don’t need your consent. There’s never a scenario where it’s necessary or helpful to say, “OK, you can search me or my car.”

Do what you’re told, but don’t volunteer anything. If you think your rights were violated, consult a lawyer afterwards.
gpt
Right but the smelling weed is automatically probable cause, no?