How to get someone to the good path who is not leading a good way of life?
The only way to influence others' behavior is through example. Your question presupposes that your friends have a desire to change.  Not everyone wants to change, or wants your help in modifying their behavior. You might consider expanding your friendship base (i.e., find new friends) if your current friends' behavior is not to your liking.  We cannot assert ourselves or our beliefs onto others.  We can only influence by example.