local MapData  = {}
MapData.x = 25
MapData.y = 30
MapData.w = 210
MapData.h = 105

/**************************
 Function: CROSSHAIR
**************************/
function crosshair()
	surface.SetDrawColor( 255, 255, 0, 255)
	surface.DrawRect(ScrW()/2-4 , ScrH()/2-3, 5, 5 )
end
hook.Add('HUDPaint', 'crosshair', crosshair)

/**************************
 Function: GAME HUD HEALTHBAR
**************************/
function healthbar()
	--		  --
	-- Health --
	--		  --
	surface.SetDrawColor( 0, 0, 0, 175)
	surface.DrawRect(15+10 , ScrH()-30, 230/2-13, 12 )
	-- ^ Background
	surface.SetDrawColor( 255, 0, 0, 200)
	if LocalPlayer():Health() < 100 then
	surface.DrawRect(15+10 , 145, LocalPlayer():Health()*2.3/2-13, 12 )
	else
	surface.DrawRect(15+10 , 145, 230/2-13, 12 )
	end
	--		 --
	-- Armor --
	--		 --
	surface.SetDrawColor( 0, 0, 0, 175)
	surface.DrawRect(130+3 , ScrH()-30, 230/2-13, 12 )
	-- ^ Background
	surface.SetDrawColor( 0, 100, 255, 200)
	if LocalPlayer():Armor() < 100 then
	surface.DrawRect(130+3 , 145, LocalPlayer():Armor()*2.3/2-13, 12 )
	else
	surface.DrawRect(130+3 , 145, 230/2-13, 12 )
	end
end
hook.Add('HUDPaint', 'healthbar', healthbar)

/**************************
 Function: GAME HUD
**************************/
function MinimapLoop()
	--			  --
	-- Background --
	--			  --
	surface.SetDrawColor( 50, 50, 50, 255)
	surface.DrawRect(15 , 145, 230, 20 )
	surface.DrawRect(15 , 20, 230, 125 )
	--			  --
	--   MiniMap  --
	--			  --
	MapData.angles = Angle(70, LocalPlayer():EyeAngles().yaw, 0)
	MapData.origin = LocalPlayer():GetPos() + Vector(0 ,0, 500)
	render.RenderView(MapData)
end
hook.Add('HUDPaint', 'MinimapLoop', MinimapLoop)
