[lua]local ExampleTexture = surface.GetTextureID( “bacon” );
local BoxSize = 60;
local Offset = BoxSize / 2;
surface.SetDrawColor( 255, 255, 255, 255 ); surface.SetTexture( ExampleTexture ); surface.DrawTexturedRect( cx, cy, BoxSize, BoxSize );
hook.Add( “HUDPaint”, “PaintBoxToScreen”, PaintBoxToScreen );[/lua]
This is what I’m using, however the image shows up perfectly fine (flickers on with the correct textures and then goes back to black). That’s mainly the issue. I tried the example on the wiki with the brick texture and it does exactly the same.