require 'lib.moonloader'
function main()
while not isSampAvailable() do wait(0) end
while true do
wait(0)
for a = 1, 2048 do
if sampIs3dTextDefined(a) then
local string, color, vposX, vposY, vposZ, distance, ignoreWalls, playerId, vehicleId = sampGet3dTextInfoById(a)
local X, Y, Z = getCharCoordinates(PLAYER_PED)
local distances = getDistanceBetweenCoords2d(vposX, vposY, X, Y)
local wposX, wposY = convert3DCoordsToScreen(vposX, vposY, vposZ)
local px , py = convert3DCoordsToScreen(X, Y, Z)
local distance1 = string.format("%.0f", getDistanceBetweenCoords3d(vposX, vposY, vposZ, X, Y, Z))
if isPointOnScreen(vposX, vposY, vposZ, 0.0) and string.find(string, "Дерево высшего качества") then
sampAddChatMessage("Я смотрю на дерево высшего качества", -1)
end
end
end
end
end