All pastes #263712 Raw Edit

Unnamed

public text v1 · immutable
·published 2006-12-01 19:19 UTC
rendered paste body
	local eye_pos = LocalPlayer():EyePos()

	for _,player in pairs(player.GetAll()) do 

		if player:IsValid() then

			local Pos = player:GetPos()
			Pos = Pos + Vector( 0, 0, 64 )

			local spos = Pos:ToScreen()

			local distance = (eye_pos - Pos):Length()

			local alpha = 255 - ( distance * 0.1 )
			
			if ( spos.visible and alpha > 0 ) then

				surface.SetFont( "DefaultSmall" )
				surface.SetTextColor( 255, 255, 255, alpha )
				surface.SetTextPos( spos.x - width, spos.y - height - 16 )
				surface.DrawText( player:Nick() )

			end
		end
	end