Its not going to be efficient way to prevent wall hacking but if you disable name tags for players then it will be impossible to wall hack.
As far as I know, even with nametags disabled, wallhackers can still see them. For example I could see masked people's names on LSRP normally even if their nametags were disabled.