After many tries to help my friend out of sinning and bad habits, should I just let them be or do I continue to try to help them even if they don't agree?
Bismillah
Thank you for your question. Encouraging people towards what is good and forbidding them from what is not is only to the extent that the person will listen to you. At the end of the day everyone has their own choice and if your advice is not heeded and unappreciated then you do not have to continue trying.
May you always be successful.