I am trying to teach my 3-year-old son good values, but at the same time we don't live these values in reality. For example, I am teaching him to be nice to everyone, while being nice, in reality, means he will get exploited by other people. What should I do?
If you are trying to teach certain ideals but aren't living them yourselves, your child will soon pick up on that, and will - I guarantee you - at some point throw that in your face, much to your embarrassment. Kids learn more from what they see you doing than from what you say.
How you really behave is in accordance with your true values. If you aren't nice to everyone, then it's not really valuable to you. Think deeply about your behavior and why you do what you do. If you believe you're correct, teach those values. If you believe you're actually in the wrong, change your behavior.
In the meantime, we all slip up. Apologize to everyone involved, and explain to your son why what you did was wrong. Let him see you trying to do better. Forgiveness is just as important to teach as that we all make mistakes and we should strive to do our best even if we sometimes fail.
Being exploited by others isn't the end of the world if you realize what's happening and you choose to allow it. But if you want to avoid that, start teaching your child about healthy boundaries early on. In many circumstances, it's ok - and even important - to say "no", for example.
Boundaries are foreign to too many people. Teaching healthy boundaries and practicing them yourselves will be an enormous gift to your child.