Public Service Announcement:
“If I am not under arrest, I wish to go on my way. If I am under arrest, please tell me. I do not consent to any search of my person, my property, my premises, my car, or the location of my arrest. I wish to remain silent and have my attorney present during any questioning, lineup, or search. If you attempt to obtain a waiver of such rights, I want to talk to my attorney before any conversation with law enforcement, especially concerning the subject of the waiver.”
You don’t have to know this verbatim. But you should know your rights, and this articulates them fairly well. In sum, determine if you are under arrest and if not, leave. Do not consent to a search of any kind whether under arrest or not. Remain silent.
Do not assume that law enforcement officers are telling you the truth. They are under no legal obligation to do so.