function SWEP:DrawHUD(cr)
if cr == 1 then
–gets the center of the screen
local x = ScrW() / 2.0
local y = ScrH() / 2.0
local fth = ScrW() / 4
local fthy = Scrh() / 4
--set the drawcolor
surface.SetDrawColor( 255, 255, 255, 255 )
local gap = 5
local length = gap + 15
--draw the crosshair
surface.DrawLine( x - length, y, x - gap, y )
surface.DrawLine( x + length, y, x + gap, y )
surface.DrawLine( x, y - length, x, y - gap )
surface.DrawLine( x, y + length, x, y + gap )
surface.DrawOutlinedRect( fth, fthy / 4, y, x );
end
cr = 0
end
when i run this, console says that scrw is nil or something. any help?]
NOOO!!! i posted in the wrong section…