You have a right to refuse consent to a search or to talk, and exercising that right cannot be used against you. Officers will often search whether you consent or not, so do not consent. You have a right to insist that a search only occur under authority of the law. You should insist on your rights but do not be confrontational.
Make no statement without consulting a lawyer first. You have a right to remain silent, so use it. Many people are in prison solely because they gave the police enough to convict them by choosing to engage in a conversation with the police. Don't be tricked by being told that it will go better for you or you will get out of jail sooner if you talk. It is a lie, and police are legally permitted lie to you to get you to make a statement.
If arrested, call your family so they can get you out of jail and hire a lawyer for you. If you do not get out of jail right away, the lawyer can help get bond reduced and remind the police not to talk to you.
While in jail, do not talk about your case with your cellmates, jailers, your family, or anyone except your criminal defense lawyer. You never know when a cellmate will become a snitch and even make up things you said to him or her. You also never know when the others will turn on you, too.