My parents are addicts? How can I prevent myself from becoming an addict too?

Be Extra Careful. You certainly are at higher risk than the average individual by virtue of your genetics. If at all possible abstain from alcohol, nicotine, & controlled substances. Be alert to symptoms of depression & anxiety so that you can bring them to the attention of your healthcare provider (& treat them appropriately). Stick with a healthy social group that doesn't lean towards using.
Don't start. Many physicians working in addiction treatment strongly advise people with family histories of addiction to not begin using addictive chemicals, particularly alcohol. Genetic predispositions have been proven for alcohol, and are strongly suspected in Cocaine and amphetamine use, as well as opiates (heroin, oxycodone etc.). Maintaining a balanced and healthy lifestyle exercise relationships helps.