3d2d

I’m trying to do a target ID system in 3d2d but… my code don’t work.
This is my code: [lua]
function GAMEMODE.HUDPaint()

for k, v in pairs( player.GetAll() ) do
	cam.Start3D2D(v:GetPos() + Vector(0,0, 100), v:GetAngles(), 1)
		
		draw.DrawText(v:Name(), "ScoreboardText", 3, 0, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
		surface.SetFont("ScoreboardText")
		draw.RoundedBox(5, 0, 0, 10, surface.GetTextSize(v:Name()) + 10, Color(44, 103, 236, 255))
		
	cam.End3D2D()	
end

end
[/lua]

Overriding gamemode functions should be named GM: not GAMEMODE:

3d2d doesn’t work in HUDPaint since HUDPaint was made to draw 2d, you can’t draw 3d in 2d space. Look for something like **[Gamemode.PostDrawOpaqueRenderables

http://wiki.garrysmod.com/favicon.ico](wiki.garrysmod.com/?title=Gamemode.PostDrawOpaqueRenderables)** for that

Thanks a lot! It works now!