جرب
Marker = createMarker (x,y,z,"cylinder",1.5,255,0,0,0)
addEventHandler("onClientRender", getRootElement(),
function()
local x, y, z = getElementPosition(Marker)
local x2, y2, z2 = getElementPosition(localPlayer)
if (isLineOfSightClear(x, y, z, x2, y2, z2, true, true, false, true)) then
local sx, sy = getScreenFromWorldPosition(x, y, z+1.3)
if (sx) and (sy) then
local distance = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2)
if (distance < 30) then
dxDrawText("Your Text", sx+2, sy+2, sx, sy, tocolor(255, 255, 255), 2-(distance/20), "arial", "center", "center")
dxDrawText("Your Text", sx, sy, sx, sy, tocolor(255, 255, 0), 2-(distance/20), "arial", "center", "center")
end
end
end
end );