local x = 4985
local y = -3575
local z = 9
addEventHandler("onClientRender",getRootElement(),
function()
local px,py,pz = getElementPosition(getLocalPlayer())
local distance = getDistanceBetweenPoints3D ( x,y,z,px,py,pz )
if distance <= 150 then
local sx,sy = getScreenFromWorldPosition ( x, y, z+0.95, 0.06 )
if not sx then return end
local scale = 1/(0.3 * (distance / 150))
dxDrawText ( "HERE'S YOUR TEXT", sx, sy - 30, sx, sy - 30, tocolor(255,155,0,200), math.min ( 0.4*(150/distance)*1.4,4), "default", "center", "bottom", false, false, false )
end
end
)