• Remove HL2 Hud from gamemode
    4 replies, posted
Okay so on my deathrun gamemode the HL2 HUD still appears under the custom one [IMG]http://ta1pgaming.co.uk/myshit/hl2hud.png[/IMG] How can i remove it server side? Thanks in advance
In a clientside file of your gamemode, you need to use the [b][url=wiki.garrysmod.com/?title=Gamemode.HUDShouldDraw]Gamemode.HUDShouldDraw [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] hook to return the "CHudHealth" false Take a go at it and if you need more help then post back, I'll be glad to assist :)
I added local function HideThings( name ) if(name == "CHudHealth") or (name == "CHudBattery") then return false end -- We don't return anything here otherwise it will overwrite all other -- HUDShouldDraw hooks. end hook.Add( "HUDShouldDraw", "HideThings", HideThings ) Into the clienside folder, then HUD.lua but no luck
That's strange, getting any errors? And are you absolutely sure the code is even loading? (try gamemode/cl_init.lua to be absolutely sure). Also, use [lua] tags around code, it makes things easier to read :smile:
Fixed it. I forgot end at the bottom. Thanks guys :)
Sorry, you need to Log In to post a reply to this thread.