You can still be "nice" to others if that's of your nature. Some would identify that as a "good quality" and in a time of need, allies may be more willing to come to your aid. (There are other reasons as well.)
For that specific problem (of being taken advantage of), I think you'd need...