Two things people need to understand and seem to get wrong. If the police ask you for ID to write you a summons you need to give your ID. If the police stop you in your car and ask you to step out the car they you need to step out the car.
Now with the car issue if you step out the car lock your door and put the key in your pocket then won't be searching your car for any old reason.
Now with the car issue if you step out the car lock your door and put the key in your pocket then won't be searching your car for any old reason.