local sw,sh = guiGetScreenSize()
function napis(msg)
local rx,ry,rz = getCameraMatrix()
msg = {}
local x,y,z = getElementPosition(v)
local distance = getDistanceBetweenPoints3D(rx,ry,rz,x,y,z)
if distance <= 25 then
local sx,sy = getScreenFromWorldPosition(x,y,z, 200)
if sx and sy then
dxDrawText(msg, sx-(sw/5),sy,sx+(sw/5),sy, tocolor(255, 255, 255, 155), 1.2, "default-small", "center", "center", false, true)
end
end
end
addCommandHandler("tekst", napis)]