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:

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( "==========================
" )

Client side autorun:
New hud

– Removing default HUD
function hidehud(name)
for k, v in pairs{“CHudHealth”, “CHudBattery”} do
if name == v then return false 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))
.25),(x1.1),(y91),HBL,(y*7.5),Color(204,0,0,200)) – Health bar

–Draw rect’s
hook.Add(“HUDPaint”, “DrawHud”, DrawHud)

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.