Battery or power adapter problem?
PS: when I use my friend's magsafe it
  charges my MacBook Pro.


Sorry if this is too obvious, but if your friend's magsafe charger indeed charges the battery without any problems, then it certainly seems like the problem is in your charger. (Somewhere in it; the cord, magsafe adapter, or some other part.)