Console and menu lost on cl_drawhud 0

I put cl_drawhud 0 into console and after that I couldn’t open the console or menu, chat, or switch weapons. This really irritated me because I was hosting a non-dedicated server and lost all progress. What’s the problem?

Go to C:/Program Files/Steam/Steamapps/USERNAME/garrysmod/garrysmod/cfg and write “cl_drawhud 1” in the “config.cfg” and restart the game.

Or just restart the game.