Surface.SetTexture problem

Hey guys, I did whats in the GMod Wiki page,

I just copied the code to see if it works:
[lua] local tex = surface.GetTextureID(“Brick/brickfloor001a”) // Gets the texture id for the brick texture
local function drawBrickTexture()
surface.SetDrawColor(255,255,255,255) // Makes sure the image draws with all colors
hook.Add(“HUDPaint”,“DrawTheBricks”,drawBrickTexture) [/lua]

But it doesnt seem to work correctly, since only a black square will appear in my screen, and if I look around, somtimes the texture becomes visible for around 1 second, is there any fix to this?

Set your texture’s VMT to UnlitGeneric.

Thanks, i’ll try it out.


Now it pops up as a Black/Purple square in the middle… D:

Do you have the texture?

Show us your .vmt

Hmm, it isnt correct, can someone post the code for an UnlitGeneric .vmt file? Would be great.

	"$basetexture" "path/to/material"

Thanks i’ll try it out soon