script_name('TreasuresMAP')
script_author('Cosmo')
local state = false
local radius = 300
local color = 0x00FF00FF
local pool = {}
function main()
while not isSampAvailable() do wait(100) end
sampAddChatMessage(' >>{FFFFFF} TreasuresMAP by Cosmo | {FF7070}Команда: /trmap', 0xFF7070)
sampRegisterChatCommand('trmap', function()
state = not state
printStyledString(state and '~g~ON' or '~r~OFF', 1000, 6)
if not state then remove_all() end
end)
addEventHandler('onScriptTerminate', function(script, quit)
if script == thisScript() then
remove_all()
end
end)
while true do
if state then
local A = { getCharCoordinates(PLAYER_PED) }
for i, B in ipairs(coords) do
local dist = getDistanceBetweenCoords3d(A[1], A[2], A[3], B[1], B[2], B[3])
if dist <= radius and pool[i] == nil then
pool[i] = addSpriteBlipForCoord(B[1], B[2], B[3], 41)
elseif dist > radius and pool[i] ~= nil then
removeBlip(pool[i])
pool[i] = nil
end
end
end
wait(0)
end
end
function remove_all()
for i = 1, #coords do
if pool[i] ~= nil then
removeBlip(pool[i])
pool[i] = nil
end
end
end
coords = {
{-65.07, -2658.45, 81.03}, {2435.86, 1871.68, 7.30}, {686.09, 1198.56, 11.47},
{-2625.91, -997.01, 11.76}, {1077.02, -1750.26, 12.90}, {-1132.94, -853.60, 122.31},
{-2069.1, 1220.49, 34.32}, {1098.66, -314.89, 73.11}, {-1613.73, -2281.43, 35.68},
{-755.40, -1792.19, 118.51}, {-2083.54, 2920.96, 68.71}, {2101.52, 218.12, 9.48},
{984.21, -2188.37, 12.21}, {682.28, -1471.78, 13.99}, {178.60, 1457.95, 9.72},
{1881.49, -1312.85, 13.60}, {2585.14, 2182.05, 10.18}, {336.11, 2695.6, 18.97},
{-762.32, -122.95, 64.75}, {1502.67, -1833.36, 13.11}, {2744.94, 2763.85, 9.99},
{1146.54, 2327.77, 9.93}, {1366.91, 1179.42, 10.09}, {2639.31, -1974.55, 12.72},
{-771.11, -1787.86, 117.87}, {2248.41, -2273.33, 12.61}, {-1555.01, -2506.18, 89.53},
{-954.19, -524.33, 25.12}, {-335.94, -459.34, 0.45}, {2690.53, 866.52, 9.01},
{-118.56, 2279.71, 36.60}, {562.35, 2872.12, 1.12}, {1500.06, 907.58, 10.01},
{-1436.92, -967.33, 200.16}, {-1935.38, 2630.31, 82.77}, {1676.93, -2271.79, -2.13},
{-756.59, -1133.33, 61.14}, {1713.99, -2303.46, -2.10}, {-557.79, -1482.11, 8.51},
{1835.19, -1065.54, 23.81}, {-732.54, 1539.38, 39.54}, {968.81, -1632.76, 12.55},
{2350.19, -647.3, 127.22}, {2413.12, -1399.3, 23.46}, {1781.72, -278.80, 68.06},
{2404.06, 1825.6, 10.83}, {-793.23, 2264.92, 58.38}, {-2211.23, -1784.46, 311.57},
{1042.25, 2921.99, 40.94}, {-2827.06, -1832.7, 123.79}, {2261.58, 1073.99, 28.54},
{2655.22, 830.77, 7.93}, {845.85, -620.79, 16.46}, {-1297.93, 2812.93, 85.98},
{2242.78, 674.20, 10.10}, {2607.2, -501.16, 78.74}, {1817.32, 2833.52, 10.32},
{-526.52, -2704.42, 143.27}, {-1010.24, -2295.08, 58.30}, {-1160.3, 2213.24, 93.59},
{1680.18, -2158.59, 12.67}, {-1000.77, -1655.56, 75.44}, {-485.44, -2649.65, 153.81},
{2592.37, 2847.3, 9.92}, {2819.2, -1214.08, 24.16}, {-2913.08, 665.86, 5.49},
{-875.87, 1912.19, 50.49}, {1989.89, 1803.4, 11.05}, {-1710.15, 2445.66, 73.28},
{-2849.69, 2791.85, 242.61}, {-965.02, -1983.56, 65.41}, {-1321.08, -1342.2, 145.09},
{-1577.74, 45.28, 16.41}, {2651.85, 2385.58, 9.91}, {303.12, -255.16, 0.61},
{-2779.93, -1330.69, 129.72}, {-1949.27, 2371.91, 48.58}, {-2178.4, 1209.67, 39.37},
{-1501.24, 1376.56, 2.73}, {2642.4, -1462.25, 15.34}, {-669.26, 876.77, 2.04},
{-729.60, 1604.82, 26.44}, {1900.92, 2793.78, 10.02}, {-770.65, 758.12, 17.43},
{1991.27, 2183.99, 9.88}, {2636.89, -2023.81, 12.67}, {1416.71, 2547.58, 9.99},
{374.40, -116.46, 0.35}, {-2514.73, -720.51, 138.18}, {-2545.27, 692.07, 28.07},
{-2764.59, -160.36, 6.28}, {2448.83, 1510.12, 9.85}, {376.21, -1479.16, 32.38},
{-2814.12, -1513.8, 138.44}, {-2104.71, 139.72, 34.26}, {-366.13, 1195.95, 18.72},
{1566.93, 29.39, 23.24}, {1430.82, 2021.4, 10.21}, {2488.86, -1809.38, 14.94},
{-1111.07, 1126.42, 18.92}, {289.19, -560.21, 16.26}, {2386.26, 2180.21, 18.19},
{-2177.18, 615.90, 34.24}, {-1452.81, -348.37, 13.68}, {1764.68, 625.13, 9.90},
{-1647.99, 380.31, 6.27}, {712.27, 1997.89, 4.09}, {2560.63, -1111.15, 63.68},
{-2772.73, -345.55, 6.88}, {-1253.62, 49.22, 13.28}, {-2496.67, -261.73, 38.24},
{-1342.16, -2588.05, 42.15}, {-782.91, 2491.5, 99.14}, {-2232.88, -2295.68, 29.73},
{-384.15, 2365.66, 31.29}, {943.76, -894.66, 44.94}, {-219.47, 1123.72, 18.87},
{-2131.66, -2568.09, 30.53}, {-265.78, -2181.56, 28.03}, {-1078.7, -1299.61, 128.43},
{1474.93, -1382.42, 61.52}, {-1205.35, -2345.44, 0.19}, {-1005.42, 1613.49, 32.21},
{1360.64, -112.08, 25.60}, {463.09, 794.61, 6.64}, {1622.77, 1944.53, 10.14},
{-757.16, -275.03, 55.69}, {-2118.36, 2534.03, 49.20}, {2318.89, -1055.7, 51.44},
{189.76, -539.3, 46.17}, {-805.21, 2443.39, 156.14}, {-65.59, -98.04, 2.24},
{1252.99, 2551.75, 9.96}, {-514.03, -1949.6, 36.20}, {-1955.81, 497.50, 34.89},
{-1101.25, -700.55, 31.55}, {1293.96, -982.61, 31.82}, {2103.37, 2409.5, 59.97},
{-2362.18, -1056.78, 89.14}, {336.02, -570.89, 15.34}, {855.52, -221.36, 19.75},
{240.25, -1766.7, 3.68}, {-983.04, -1049.42, 128.28}, {551.49, 1222.23, 10.87},
{2522.57, -1136.58, 40.29}, {901.40, -1044.6, 29.12}, {986.32, 15.25, 85.24},
{2382.92, -1126.16, 28.52}, {-2854.93, 2190.31, 173.84}, {991.78, -1085.79, 24.21},
{697.20, 278.08, 19.64}, {2511.41, 2704.99, 10.12}, {2025.31, 714.23, 10.40},
{2846.33, 1650.96, 9.93}, {-2672.33, -2133.8, 36.96}, {2185.31, -2709.08, 3.57},
{-2204.81, 961.43, 79.13}, {-146.40, -1022.46, 1.30}, {2463.29, 708.88, 10.50},
{-1966.02, -209.29, 26.11}, {-997.97, -2230.51, 60.79}, {830.71, -1524.62, 12.86},
{2650.56, 224.77, 55.67}, {-2903.1, 1015.46, 35.97}, {-1922.8, -1651.42, 20.88},
{-826.46, -1482.2, 115.73}, {-1637.58, 532.34, 32.69}, {-1668.03, -2422.89, 100.07},
{261.91, -1075.91, 84.41}, {-369.09, -1419.77, 24.92}, {-2932.4, 453.52, 3.18},
{-2128.8, -1286.88, 77.10}, {-2097.27, -2570.42, 32.40}, {-349.40, 1615.73, 74.60},
{-1681.74, -2400.67, 100.24}, {-2564.21, 328.10, 9.66}, {1124.5, -2021.28, 68.24},
{893.96, -1863.78, 7.59}, {-2262.71, -1073.08, 14.77}, {1283.1, -1879.86, -3.55},
{-927.87, 1907.37, 129.98}, {1040.73, 1012.24, 54.40}, {1840.71, 964.83, 9.92},
{1578.32, 686.99, 10.28}, {-2150.69, -239.65, 35.69}, {2085.12, -1844.89, 3.10},
{-1662.96, 877.08, 135.14}, {-306.86, 1797.71, 41.87}, {-451.08, -1712.8, 7.68},
{302.36, -1352.38, 52.44}, {-2759.66, -1984.25, 43.57}, {1431.28, -153.52, 24.44},
{-1110.1, -1677.69, 75.46}, {603.76, 1254.35, 10.84}, {876.46, -15.42, 62.40},
{1044.04, -2190.04, 38.85}, {-776.87, 1089.94, 43.73}, {-886.20, -2365.75, 68.08},
{1934.69, -1066.14, 23.52}, {-650.64, -578.23, 31.58}, {808.48, -1090.12, 23.21},
{1834.04, -1022.1, 23.75}, {2315.09, -566.03, 128.20}, {1097.5, 1399.31, 5.69},
{2876.82, -2125.72, 3.38}, {-2531.54, 1153.38, 54.59}, {-2402.39, -213.96, 39.11},
{2652.18, -904.95, 71.54}, {1496.07, -2302.91, 12.68}, {720.19, 356.65, 19.39},
{2035.08, -457.57, 76.36}, {-1204.6, -1589.84, 63.36}, {587.60, -1604.06, 15.31},
{-396.32, 1258.82, 6.22}, {-2007.7, -2373.64, 29.71}, {689.26, 842.68, -43.84},
{782.33, 2066.82, 5.84}, {-2914.33, 906.67, 7.20}, {-298.36, -1779.91, 10.73},
{1179.39, -2143.06, 65.75}, {1680.46, 2700.99, 9.86}, {2191.7, -541.99, 121.27},
{-846.61, -832.15, 148.62}, {2637.55, 758.17, 10.12}, {691.60, 58.43, 43.74},
{1958.99, 1379.44, 8.34}, {923.24, -1129.51, 22.90}, {1668.16, 969.96, 10.14},
{2461.19, 2496.86, 9.95}, {-395.34, -1153.05, 68.59}, {-465.98, -782.24, 27.52},
{1278.33, 2124.76, 13.73}, {974.16, 182.35, 34.22}, {-1247.87, -1810.87, 59.61},
{2062.18, 2784.99, 9.97}, {1086.44, -2050.7, 55.99}, {1902.3, -1577.35, 12.71},
{1066.64, 692.54, 9.47}, {946.28, -26.91, 91.94}, {1860.95, 2383.85, 10.12},
{2080.02, -1554.42, 12.55}, {-663.81, 1578.03, 36.81}, {2932.67, 2110.03, 13.14},
{641.10, -518.91, 15.43}, {-2745.66, 132.40, 3.72}, {2298.95, -2126.06, 12.85},
{1530.02, 2679.21, 10.02}, {-2549.73, -951.95, 19.58}, {-469.29, -1423.61, 16.64}
}