Yes, you need to work on your confidence. If you don't have a strong sense of confidence and aren't able to assert yourself then certain people will treat you like a doormat. Being nice, although better than being mean, won't make these people "like" you. They just see an easy target. Anyway, the point is work on yourself and stop trying to be a people-pleaser. This idea that if you treat people nice they should be nice back is a fallacy. That's not how the world works...life isn't fair. However, a Buddhist shouldn't act "nice" to get something, we do it because it's the right thing to do. It helps weaken the defilements when we're not attached to its outcome. If you're being nice just to get something then it's just another attachment and not truly working at ridding the defilements. Anyway, you have work ahead of you, but don't despair...that's part of the journey. Work on improving your self-confidence. You need to learn to be comfortable with who you are. It takes time, but it's doable. I can say from my own experience.
Diamonds are made under pressure.