HELP - Add Texture for my HUD

I don’t know how this with adding textures work, where do i put it ? Do i have to make a resource for the client via workshop?

I just don’t know where to put the .png image and then use it in the code. I hope you understand, and hope you can help.

Sorry for my english :stuck_out_tongue:



local tex = surface.GetTextureID("folder/yourtexturenamehere") //Gets the texture id 
function drawTexture()
	surface.SetTexture(tex)
	surface.SetDrawColor(255,255,255,255) //Makes sure the image draws correctly
	surface.DrawTexturedRect(ScrW()*0.5-32,ScrH()*0.5-32,64,64) // x, y, width, height values were the image should be drawn
end
hook.Add("HUDPaint","DrawTheTexture",drawTexture)