When stopped by a police officer, Texas law requires that you pull over and turn off your vehicle when it is safe to do so. An officer may have multiple reasons for stopping you. Perhaps you have a taillight out or maybe the officer suspects you of driving illegally. Whatever the reason, the officer may search your vehicle without a warrant if they have probable cause to do so.
Furthermore, some officers may ask for your consent prior to searching your vehicle. If they have probable cause, they do not need your consent. For example, the officer may have seen something in your vehicle that led them to believe you were in possession of drugs or firearms.
What you can do, and what you cannot do
That is not to say that you are not without rights, however. Some of your rights during a traffic stop include the right to remain silent and the right to report an officer for unfair treatment or abuse. If the officer arrests you on suspicion of a DWI, though, you may not refuse a breath test. If you do refuse a breath test, it is possible you could lose your license per Texas state law.
Resisting an arrest or fleeing is also prohibited. You may receive more damaging penalties if you resist an arrest from a police officer in Texas. It is best to respectfully comply and then exercise your right to contact an attorney.