3D2D Help

Need some help with 3D2D here:


//City
include('shared.lua')

surface.CreateFont( "watevrstuf", {
	font = "Arial",
	size = 40,
	weight = 1000,
	blursize = 0,
	scanlines = 0,
	antialias = true,
	underline = false,
	italic = false,
	strikeout = false,
	symbol = false,
	rotary = false,
	shadow = false,
	additive = false,
	outline = false,
})

surface.CreateFont( "otherstuf", {
	font = "Arial",
	size = 30,
	weight = 1000,
	blursize = 0,
	scanlines = 0,
	antialias = true,
	underline = false,
	italic = false,
	strikeout = false,
	symbol = false,
	rotary = false,
	shadow = false,
	additive = false,
	outline = true,
})



function ENT:Draw()
	
	self.Entity:DrawModel() 

	local Name = LocalPlayer():Nick()
	local lpos = LocalPlayer():GetPos()
	local entity = LocalPlayer():GetEyeTrace().Entity
	
	
	if entity:IsValid() and lpos:Distance( entity:GetPos() ) < 160 then

		local p
		
		local ang = LocalPlayer():EyeAngles()
		
			p = entity:GetPos() + Vector(0,0,90) --+ math.sin(CurTime()*3))
		
		
			cam.Start3D2D(p, Angle( 0, ang.y - 90, 90 ), 0.1)
				draw.RoundedBox( 8,  -200 - 50, 440 + 100, 190 + 20 * 2, 130, Color( 50, 50, 50, 255 ) ) --Box
				--draw.RoundedBox( 4,  -246, 404, 492, 292, Color( 48, 96, 139, 255 ) )
				draw.RoundedBox( 4,  -182 - 50, 460 + 20 + 100, 160 + 15 * 2, 1, Color( 255, 255, 255, 255 ) ) --Underline
				draw.RoundedBox( 4, -182 - 50, 500 + 1 + 100, 160 + 15 * 2, 20, Color( 255, 0, 0, 255) ) --Health Bar
				draw.DrawText( "Health", "otherstuf", -182 - 50, 500 + 20 + 76, Color( 255, 255, 255, 255) ) --Health Text
				draw.DrawText( "City", "otherstuf", -210, 400 + 70 + 150, Color(255, 255, 255, 255), TEXT_ALIGN_CENTER) --Ent Name
				draw.DrawText(Name, "watevrstuf", -135, 400 + 40 + 100, Color(255, 255, 255, 255), TEXT_ALIGN_CENTER) --Owner's Name
				
			cam.End3D2D()
	
		for _,yaw in pairs({0, 180}) do
	
			local ang = LocalPlayer():EyeAngles()

		end
	end
end

The problem is I have two boxes drawing. One static and the other floating. How do I get rid of the floating box?

http://i.imgur.com/dnntEF8.jpg[/T]
[T]http://i.imgur.com/ncLV0bc.jpg

This doesn’t answer your question but you should remove entity from self.Entity:DrawModel () if you want the model to draw

The model already draws :v: I just cropped it out.

Change map/restart server.

Yeah lua errors and vgui tend to cause weird things

Fixed. Thank you Author.

Solution:
Removing


 for _,yaw in pairs({0, 180}) do 

because it was running two things in a table.