function getDistanceBetweenCoords3d(x1, y1, z1, x2, y2, z2)
return math.sqrt(((x2 - x1)^2) + ((y2 - y1)^2) + ((z2 - z1)^2))
end
function getPlayersInRadius(radius)
local players = {}
for id, data in pairs(getAllPlayers()) do
if (getDistanceBetweenCoords3d(data.position.x, data.position.y, data.position.z, getBotPosition()) <= radius) then
table.insert(players, id)
end
end
return players -- вернет массив с ID игроков в указаном радиусе
end