for _, v in pairs(getAllObjects()) do
if massive[getObjectModel(v)] then
if isObjectOnScreen(v) then
local pX, pY, pZ = getCharCoordinates(PLAYER_PED)
local result, oX, oY, oZ = getObjectCoordinates(v)
if result then
local dist = math.floor(getDistanceBetweenCoords3d(pX, pY, pZ, oX, oY, oZ))
local pOSx, pOSy = convert3DCoordsToScreen(pX, pY, pZ)
local oOSx, oOSy = convert3DCoordsToScreen(oX, oY, oZ)
renderDrawLine(pOSx, pOSy, oOSx, oOSy, 1, 0xFFFFFF00)
renderFontDrawText(font, '{669900}'..text..'[{FFFFFF}'..dist..'{669900}]', oOSx, oOSy,-1)
end
end
end
end