HUD textures wont dl

i cant get the hud texture to dl even though i poppied it directly to my computer, still doesn’t work?

This is in an addon style thing

server-side autorun:
[lua]

/----------------------------------------------------------------
Server load
----------------------------------------------------------------/

AddCSLuaFile( “autorun/client/cl_HUD.lua” )

resource.AddFile( “materials/gui/HUD.vtf” )
resource.AddFile( “materials/gui/HUD.vmt” )

print( "
==========================" )
print( " Chrome HUD loaded" )
print( "==========================
" )
[/lua]

Client side autorun:
[lua]
/---------------------------------------------------
New hud
---------------------------------------------------
/

– Removing default HUD
function hidehud(name)
for k, v in pairs{“CHudHealth”, “CHudBattery”} do
if name == v then return false end
end
end
hook.Add(“HUDShouldDraw”, “hidehud”, hidehud)

function DrawHud ()
local ply = LocalPlayer()
local health = ply:Health()
local armor = ply:Armor()
local texture = surface.GetTextureID(“materials/gui/HUD”)

–Screen Percentage
local x = ScrW()/100
local y = ScrH()/100

– Draw red health bar under material
local HBL = math.Clamp((health/100)(x28),(x*.5),(x27.5))
draw.RoundedBox((x
.25),(x1.1),(y91),HBL,(y*7.5),Color(204,0,0,200)) – Health bar

–Draw rect’s
surface.SetTexture(texture)
surface.SetDrawColor(255,255,255,0)
surface.DrawTexturedRect(x,y90,x10,y*30)
end
hook.Add(“HUDPaint”, “DrawHud”, DrawHud)
[/lua]

i have the material in the correct place too i think

/addons/Chrome Hud/materials/gui/HUD.vtf

Make sure.

Yeah I don’t think resource.AddFile will work on an addon folder like that. Try including /addons/addonname/

ive seen that code in other addons thats why i used it i didnt know any other way for it to work, im sure its in the correct place

Make sure the server is restarted so the add-on is loaded.

it draws the red box under where the material should be but i just get the error missing materials:gui/hud something like that

You don’t have to include materials/ in surface.GetTextureID.