These two things are interrelated.You have to be good to people in your society by respecting them, talking to them politely, helping and caring for them within your means. If you do so, of course they shall consider you to be a nice person.Being nice or being good is just a word until proved by being kind, helping, loving, respecting or caring for people.