I swear in front of my kids. My mother goes positively apeshit about it and insists that if I swear then I simply cannot be upset when they do. I call bullshit. I swear in front of my kids, and I drink beer in front of them, and I drink coffee in front of them, and for a while I smoked in front of the oldest. Also, I share a bed with a member of the opposite sex, I have tattoos, and I drive. All of these are things that I apologetically refuse to let them do. Why do I get to do them? Because I am the adult. There are certain privileges which are afforded to adults. Driving, sex, and swearing are but a few of these things. Also, if I so choose, I am free to run with scissors. But I don't do that because I may put my eye out if I do.
I do not consider myself a hypocrite because I smoked for 20 years and still tell my kids not to. I consider myself someone who can tell them with absolute certainty that addiction is guaranteed and it sucks. I had a child out of wedlock, and I try to convince my daughter to abstain. And I can tell her that although having her was one of the greatest things that ever happened to me, it probably could have happened a few years later and it would not have been any less magical. When I hear people say that they can't teach their kid not to smoke pot because they did it in high school, I slap my forehead. Of course you can try to get your kid to avoid your mistakes. That's your goddamned job! You made a lifetime of stupid mistakes so that your kid can avoid them! Then the kid makes all new stupid mistakes and hopefully, somewhere down the line, we end up with a generation that doesn't actually have to screw up quite so much. It's a noble goal; don't fuck it all up!