Метки для АРЗ

Крейзи

Участник
Автор темы
39
4
Версия MoonLoader
.026-beta
У меня есть концепт скрипта для меток какая функция для добавления меток на АРЗ кроме addBlipOnCoords() естьь потомушто не ворк на аризона ето. Также есть скриншот какие метки сделать нада
photo_2024-03-13_21-39-10.jpg
 
D

deleted-user-139653

Гость
а ну попробуй, как-то делал скриптик, можешь переделать под себя...
image.png

Lua:
local coordinates = {
{x = 2464, y = -1715, z = 13},
{x = 2020, y = -1203, z = 20},
{x = 2243, y = -1370, z = 40},
{x = 2832, y = -1208, z = 24},
{x = 2202, y = -2307, z = 14},
{x = 2504, y = -2641, z = 13},
{x = 2209, y = -2586, z = 15},
{x = 1653, y = -2553, z = 17},
{x = 1773, y = -1958, z = 19},
{x = 1723, y = -1615, z = 14},
{x = 2164, y = -1676, z = 18},
{x = 2217, y = -1151, z = 26},
{x = 1450, y = -1017, z = 25},
{x = 560, y = -1812, z = 6},
{x = 357, y = -2029, z = 10},
{x = 170, y = -1952, z = 3},
{x = 422, y = -1520, z = 31},
{x = 953, y = -1749, z = 13},
{x = 671, y = -1277, z = 18},
{x = 1294, y = -834, z = 83},
{x = 1951, y = -1366, z = 24},
{x = 1528, y = -1349, z = 329},
{x = 548, y = -1069, z = 76},
{x = 291, y = -1387, z = 13},
{x = -78, y = -1582, z = 5},
{x = -289, y = -2166, z = 31},
{x = -20, y = -2470, z = 36},
{x = 20, y = -2650, z = 45},
{x = -1568, y = -2732, z = 51},
{x = -2158, y = -2446, z = 33},
{x = -2402, y = -1633, z = 521},
{x = -2271, y = -1731, z = 487},
{x = -1955, y = -2441, z = 32},
{x = -1893, y = -1698, z = 24},
{x = 903, y = -1492, z = 13},
{x = -557, y = -1092, z = 23},
{x = -622, y = -470, z = 25},
{x = -1062, y = -563, z = 32},
{x = -531, y = -168, z = 81},
{x = -92, y = -405, z = 1},
{x = -109, y = -1174, z = 2},
{x = 1213, y = 224, z = 22},
{x = 1927, y = 169, z = 40},
{x = 2263, y = -79, z = 26},
{x = 2847, y = 944, z = 12},
{x = 2693, y = 825, z = 12},
{x = 2335, y = 987, z = 10},
{x = 2192, y = 923, z = 11},
{x = 812, y = 860, z = 15},
{x = 1552, y = 788, z = 11},
{x = 1669, y = 971, z = 11},
{x = 1854, y = 693, z = 11},
{x = 2579, y = 1062, z = 11},
{x = 2819, y = 1307, z = 10},
{x = 2473, y = 1544, z = 10},
{x = 2621, y = 1827, z = 13},
{x = 2402, y = 1883, z = 10},
{x = 2920, y = 2103, z = 21},
{x = 2821, y = 2359, z = 11},
{x = 2545, y = 2796, z = 10},
{x = 2327, y = 2427, z = 11},
{x = 2616, y = 2206, z = 13},
{x = 2098, y = 2368, z = 60},
{x = 2136, y = 2037, z = 10},
{x = 1999, y = 1539, z = 13},
{x = 2098, y = 1294, z = 10},
{x = 1325, y = 1537, z = 10},
{x = 1129, y = 1386, z = 10},
{x = 1034, y = 2063, z = 14},
{x = 1628, y = 1856, z = 10},
{x = 1621, y = 2210, z = 15},
{x = 1493, y = 2778, z = 10},
{x = -41, y = 17, z = 3},
{x = -323, y = 844, z = 18},
{x = -181, y = 1211, z = 21},
{x = -810, y = 1467, z = 19},
{x = -1050, y = 1563, z = 36},
{x = -1370, y = 2055, z = 55},
{x = -1480, y = 2646, z = 58},
{x = -1665, y = 2556, z = 88},
{x = -2376, y = 2434, z = 9},
{x = -2605, y = 1407, z = 7},
{x = -1817, y = 1399, z = 7},
{x = -1872, y = 1088, z = 47},
{x = -2070, y = 650, z = 52},
{x = -2400, y = 948, z = 47},
{x = -2615, y = 676, z = 28},
{x = -2837, y = 854, z = 44},
{x = -2378, y = 42, z = 35},
{x = -2156, y = -84, z = 35},
{x = -2138, y = -247, z = 36},
{x = -1990, y = 320, z = 35},
{x = -1527, y = 108, z = 19},
{x = -1458, y = -431, z = 6},
{x = -1361, y = -180, z = 6},
{x = -1227, y = 49, z = 14},
{x = -1437, y = -1447, z = 105},
{x = -1104, y = -1640, z = 79},
{x = 1357, y = -1663, z = 17},
{x = 1953, y = -1742, z = 18},
{x = 1656, y = -2553, z = 17},
}

local blips = {}
local isBlipCreated = {}

function main()
    repeat wait(0) until isSampAvailable()

    sampRegisterChatCommand("fp", function()
        on = not on
        sampAddChatMessage("{FFFFFF}FindPumpkin: " .. (on and "{00FF00}ON" or "{FF0000}OFF"))
        if not on then
            for i, blip in pairs(blips) do
                removeBlip(blip)
            end
            blips = {}
            isBlipCreated = {}
        end
    end)

    while true do wait(0)
        if on then
            x, y, z = getCharCoordinates(PLAYER_PED)
            for i, markerCoords in ipairs(coordinates) do
                local distance = getDistanceBetweenCoords3d(markerCoords.x, markerCoords.y, markerCoords.z, x, y, z)
           
                if distance < 500 and not isBlipCreated[i] then
                    local blip = addSpriteBlipForCoord(markerCoords.x, markerCoords.y, markerCoords.z, 41)
                    blips[i] = blip
                    isBlipCreated[i] = true
                elseif distance > 500 and isBlipCreated[i] then
                    if blips[i] then
                        removeBlip(blips[i])
                        blips[i] = nil
                    end
                    isBlipCreated[i] = false
                end
            end
        end
    end
end