local utils
local Utils = {}
function Utils:new()
local public = {}
function public:getDistanceBetweenCoords3d(x1, y1, z1, x2, y2, z2)
return math.sqrt((x1 - x2)^2 + (y1 - y2)^2 + (z1 - z2)^2))
end
setmetatable(public, self)
self.__index = self; return public
end
registerHandler("onLoad", function()
newTask(function()
utils = Utils:new()
local x, y, z = -1320, 500, 15 -- координаты, с которыми надо сверяться
while true do wait(0)
if utils:getDistanceBetweenCoords3d(x, y, z, getBotPosition()) <= 0.1 then
print("Ты на нужных коордах")
end
end
end
end