Your mom was right.  The only way to get a friend is to be a friend.  It is impossible to make friends if you consistently push people away.  One way to be a friend is to listen to people.  Listening is a lost art.  When you listen to someone you should not be thinking about what you want to say next.  Really focus on the person. Ask questions. Focus on them!