• Custom HUD ignores "Draw HUD"
    6 replies, posted
So i created a big custom HUD, and it works great, but i found a bug. If you press C and goto Drawing/Draw HUD and uncheck that, my HUD still is there. It doesnt go away. Any Lua function/code to fix that? All my HUD is inside the HUDPaint hook of course.
You could add a callback on cl_drawhud to remove/create your HUD's hook. https://github.com/Facepunch/garrysmod/blob/7fc7045f1ef2bea76d2954fe0a615d4d6324383d/garrysmod/lua/autorun/menubar.lua#L18 cvars.AddChangeCallback
well that gives me the error attempt to call method 'AddOrGetMenu' (a nil value)
That's because 'AddOrGetMenu' is nil.
..and that helps me how?
https://pastebin.com/mHKEKYhk Should work
Ah hell yea! Thanks alot. I tryd out some other Workshop HUDs and it seems they all still are there when you disable draw hud. And since my hud is outstanding anyway because some features, this one makes it even better. By the amount of times you helped me already i could already put you in the contributor list XD
Sorry, you need to Log In to post a reply to this thread.