Surface.SetTexture + surface.DrawTexturedRect


That’s what i’m using and i’ve placed healthbar.vtf in my garrysmod/garrysmod/materials/noobshud/ folder
and for some reason it won’t display it just keeps telling me i don’t have it, and i’m not sure why.

Can anyone help me on this one?

First of all, you don’t need “materials/” part of path, second of all, do you have corresponding .vmt file in same directory as .vtf?
By the way you can use PNG textures, it doesn’t require dicking around with .vmt/.vtf pairs. Something like this:

local tex = Material("path/myfile.png", "smooth")
hook.Add("HUDPaint", "something", function()
    surface.DrawTexturedRect(10, 10, 300, 300)

Changed it to png and it worked thank you.