Overriding hud?

Hi, I want to override the hud in the gm I use, how can I do this?

At least tell us what gamemode and what you want to override the HUD with.

It is F2S: Stronghold

and I want to replace it with a hud on the workshop.

I didn’t tell you because I thought the method would apply to all hud’s

Overwrite GM:HUDPaint

This is the code I have so far:

local hide = {
	CHudHealth = true,
	CHudAmmo = true,

hook.Add( "HUDShouldDraw", "HideHUD", function()

	if ( hide[ name ] ) then return false end


local hide = {
	CHudHealth = true,
	CHudBattery = true,

hook.Add( "HUDShouldDraw", "HideHUD", function( name )
	if ( hide[ name ] ) then return false end

	-- Don't return anything here, it may break other addons that rely on this hook.
end )

is better. That will overwrite the ugly default hud and then you can get working. Put that in cl_init.lua or whatever hud file you’re using.

Thankyou, but I am unable to test it at the moment as I keep getting a really strange error with my gamemode, I have added custom weapons to it, it worked great, then I restarted the server, it still works for everyone else but I get the following error:

[ERROR] gamemodes/stronghold/gamemode/vgui/sh_loadoutpanel.lua:237: attempt to concatenate a boolean value

  1. OnRowSelected - gamemodes/stronghold/gamemode/vgui/sh_loadoutpanel.lua:237
  2. DoRefreshLicenses - gamemodes/stronghold/gamemode/vgui/sh_loadoutpanel.lua:371
    3. Refresh - gamemodes/stronghold/gamemode/vgui/sh_loadoutmenu.lua:44
    4. Open - gamemodes/stronghold/gamemode/vgui/sh_loadoutmenu.lua:62
    5. unknown - gamemodes/stronghold/gamemode/cl_panels.lua:147
    6. unknown - lua/includes/modules/concommand.lua:54

Post the code.

I already have another post open for the error: