You're not going to be able to prevent it. Smoking is really bad for your teeth, so the only thing you can really do is go to the dentist more often and clean your teeth more thoroughly to get rid of any stains or discoloration. It isn't preventable, though. Quit if you can!