include("shared.lua")

surface.CreateFont( "PlayerTagFont", {
	font = "Arial",
	size = 72,
} )

function ENT:Draw()
		self:DrawModel()
		angle = self:GetAngles() + Angle(0,90,90)
		pos = self:GetPos() + angle:Forward() * 0 + angle:Up() * 0 + angle:Right() * -30
		cam.Start3D2D( pos, angle, 0.05 )

			surface.SetFont( "PlayerTagFont" )
			local tW, tH = surface.GetTextSize( self.DisplayName )

			local padX = 20
			local padY = 5

			surface.SetDrawColor( 0, 0, 0, 200 )
			surface.DrawRect( -tW / 2 - padX, -padY, tW + padX * 2, tH + padY * 2 )

			draw.SimpleText( self.DisplayName, "PlayerTagFont", -tW / 2, 0, color_white )
		cam.End3D2D()
end

function ENT:IsTranslucent()
	return true
end
