There's a reason why a gambling addict don't tell tell families about their addiction, and a close friend should respect that. If you really wanted to help, better ask your friend's permission first before you tell it to anybody, especially their family.
The reason why they don't tell it to their love ones is that they are afraid of getting judge, instead of getting sympathy and help from them. Not all people have a very understanding families, mostly they've got toxic one that's why they do stuff that will get their families attention.
The only help they could get is from a friend who is willing to guide them in a different path that's going to cure their addiction.
Most likely they are afraid of being judged or scolded by family members who are older than them, but in my opinion this is normal, because it is impossible for a family to remain silent when one of its members does something that is not good or excessive. scolding may not mean hatred but rather why he could do such a dangerous thing that harms himself. but the family is sure that after scolding him they will definitely help him to get out of the problem he is experiencing, there is no way they will just leave him like that. unless the main perpetrator is really stubborn and cannot be directed.
It's true that not everyone has a caring family or has a good relationship with their family, there are people who have a bad relationship with their family, but even so, that doesn't mean we have to do things that are detrimental to ourselves, in fact I think when we don't have We must have a good relationship with our family to be able to prove that we can be successful without support from family, because I am sure that when we are successful, what was previously an indifferent family will definitely come, and after that it is up to each of us.