All pastes #263720 Raw Edit

Stuff

public text v1 · immutable
·published 2006-12-01 19:28 UTC
rendered paste body
	local eye_pos = LocalPlayer():EyePos()
	local colour  = {r = 255, g = 255, b = 255, a = 255

	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

				colour.a = alpha
				draw.SimpleText(player:Nick(), "DefaultSmall", spos.x - width, spos.y - height, colour, TEXT_ALIGN_CENTER)

			end
		end
	end