Lua CoordMaster

atizoff

приобретаю кашель за деньги
Проверенный
1,296
1,179
хочу сказать, что можешь не пытаться ставить настройки для визибла без обходов на инвизибл, так как для инвизибла нужны обходы, для визибла по стандарту нет
оам data.position.x
 

Oi Nikazum

Потрачен
Автор темы
182
232
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.

Joni Scripts

Известный
535
374
Для тех кто пришел за кодом
Lua:
slot0 = require("samp.events")
require("encoding").default = "CP1251"
slot4 = require("encoding").UTF8
slot5, slot6 = getScreenResolution()
slot7 = require("imgui").ImBool(false)
slot8 = require("imgui").ImBool(false)
slot9 = 1.2
setposs = false
sendpll = false

function apply_custom_style()
    slot0 = slot0

    uv0.SwitchContext()

    slot0 = uv0.GetStyle()
    slot0.WindowRounding = 2
    slot0.WindowTitleAlign = uv0.ImVec2(0.5, 0.84)
    slot0.ChildWindowRounding = 2
    slot0.FrameRounding = 2
    slot0.ItemSpacing = uv0.ImVec2(5, 4)
    slot0.ScrollbarSize = 13
    slot0.ScrollbarRounding = 0
    slot0.GrabMinSize = 8
    slot0.GrabRounding = 1
    slot0.Colors[uv0.Col.Text] = slot3(1, 1, 1, 1)
    slot0.Colors[uv0.Col.TextDisabled] = slot3(0.5, 0.5, 0.5, 1)
    slot0.Colors[uv0.Col.WindowBg] = slot3(0.06, 0.06, 0.06, 0.94)
    slot0.Colors[uv0.Col.ChildWindowBg] = slot3(1, 1, 1, 0)
    slot0.Colors[uv0.Col.PopupBg] = slot3(0.08, 0.08, 0.08, 0.94)
    slot0.Colors[uv0.Col.ComboBg] = slot0.Colors[uv0.Col.PopupBg]
    slot0.Colors[uv0.Col.Border] = slot3(0.43, 0.43, 0.5, 0.5)
    slot0.Colors[uv0.Col.BorderShadow] = slot3(0, 0, 0, 0)
    slot0.Colors[uv0.Col.FrameBg] = slot3(0.16, 0.29, 0.48, 0.54)
    slot0.Colors[uv0.Col.FrameBgHovered] = slot3(0.26, 0.59, 0.98, 0.4)
    slot0.Colors[uv0.Col.FrameBgActive] = slot3(0.26, 0.59, 0.98, 0.67)
    slot0.Colors[uv0.Col.TitleBg] = slot3(0.04, 0.04, 0.04, 1)
    slot0.Colors[uv0.Col.TitleBgActive] = slot3(0.16, 0.29, 0.48, 1)
    slot0.Colors[uv0.Col.TitleBgCollapsed] = slot3(0, 0, 0, 0.51)
    slot0.Colors[uv0.Col.MenuBarBg] = slot3(0.14, 0.14, 0.14, 1)
    slot0.Colors[uv0.Col.ScrollbarBg] = slot3(0.02, 0.02, 0.02, 0.53)
    slot0.Colors[uv0.Col.ScrollbarGrab] = slot3(0.31, 0.31, 0.31, 1)
    slot0.Colors[uv0.Col.ScrollbarGrabHovered] = slot3(0.41, 0.41, 0.41, 1)
    slot0.Colors[uv0.Col.ScrollbarGrabActive] = slot3(0.51, 0.51, 0.51, 1)
    slot0.Colors[uv0.Col.CheckMark] = slot3(0.26, 0.59, 0.98, 1)
    slot0.Colors[uv0.Col.SliderGrab] = slot3(0.24, 0.52, 0.88, 1)
    slot0.Colors[uv0.Col.SliderGrabActive] = slot3(0.26, 0.59, 0.98, 1)
    slot0.Colors[uv0.Col.Button] = slot3(0.26, 0.59, 0.98, 0.4)
    slot0.Colors[uv0.Col.ButtonHovered] = slot3(0.26, 0.59, 0.98, 1)
    slot0.Colors[uv0.Col.ButtonActive] = slot3(0.06, 0.53, 0.98, 1)
    slot0.Colors[uv0.Col.Header] = slot3(0.26, 0.59, 0.98, 0.31)
    slot0.Colors[uv0.Col.HeaderHovered] = slot3(0.26, 0.59, 0.98, 0.8)
    slot0.Colors[uv0.Col.HeaderActive] = slot3(0.26, 0.59, 0.98, 1)
    slot0.Colors[uv0.Col.Separator] = slot0.Colors[uv0.Col.Border]
    slot0.Colors[uv0.Col.SeparatorHovered] = slot3(0.26, 0.59, 0.98, 0.78)
    slot0.Colors[uv0.Col.SeparatorActive] = slot3(0.26, 0.59, 0.98, 1)
    slot0.Colors[uv0.Col.ResizeGrip] = slot3(0.26, 0.59, 0.98, 0.25)
    slot0.Colors[uv0.Col.ResizeGripHovered] = slot3(0.26, 0.59, 0.98, 0.67)
    slot0.Colors[uv0.Col.ResizeGripActive] = slot3(0.26, 0.59, 0.98, 0.95)
    slot0.Colors[uv0.Col.CloseButton] = slot3(0.41, 0.41, 0.41, 0.5)
    slot0.Colors[uv0.Col.CloseButtonHovered] = slot3(0.98, 0.39, 0.36, 1)
    slot0.Colors[uv0.Col.CloseButtonActive] = slot3(0.98, 0.39, 0.36, 1)
    slot0.Colors[uv0.Col.PlotLines] = slot3(0.61, 0.61, 0.61, 1)
    slot0.Colors[uv0.Col.PlotLinesHovered] = slot3(1, 0.43, 0.35, 1)
    slot0.Colors[uv0.Col.PlotHistogram] = slot3(0.9, 0.7, 0, 1)
    slot0.Colors[uv0.Col.PlotHistogramHovered] = slot3(1, 0.6, 0, 1)
    slot0.Colors[uv0.Col.TextSelectedBg] = slot3(0.26, 0.59, 0.98, 0.35)
    slot0.Colors[uv0.Col.ModalWindowDarkening] = slot3(0.8, 0.8, 0.8, 0.35)
end

apply_custom_style()

if not doesFileExist("moonloader/config/coord.ini") then
    require("inicfg").save({
        main = {
            delta = 1,
            height = -10,
            time = 0,
            surfX = 0,
            surfZ = 0,
            surfY = 0,
            nopSetPos = false,
            nopPlayerSync = false,
            mSpeedZ = 0,
            mSpeedY = 0,
            visible = true,
            mSpeedX = 0,
            bypass = false
        }
    }, "coord.ini")
end

slot3.save(slot10, "coord.ini")

slot11 = slot1.ImInt(slot3.load(slot10, "coord.ini").main.time)
slot12 = slot1.ImInt(slot3.load(slot10, "coord.ini").main.delta)
slot13 = slot1.ImInt(slot3.load(slot10, "coord.ini").main.height)
slot14 = slot1.ImFloat(slot3.load(slot10, "coord.ini").main.mSpeedX)
slot15 = slot1.ImFloat(slot3.load(slot10, "coord.ini").main.mSpeedY)
slot16 = slot1.ImFloat(slot3.load(slot10, "coord.ini").main.mSpeedZ)
slot17 = slot1.ImFloat(slot3.load(slot10, "coord.ini").main.surfX)
slot18 = slot1.ImFloat(slot3.load(slot10, "coord.ini").main.surfY)
slot19 = slot1.ImFloat(slot3.load(slot10, "coord.ini").main.surfZ)
slot20 = slot1.ImBool(slot3.load(slot10, "coord.ini").main.nopPlayerSync)
slot21 = slot1.ImBool(slot3.load(slot10, "coord.ini").main.nopSetPos)
slot22 = slot3.load(slot10, "coord.ini").main.visible
slot23 = slot3.load(slot10, "coord.ini").main.bypass
format = "%.2f"

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

    sampAddChatMessage("{FF5656}[CoordMaster]: {FFFFFF}Автор:{FF5656} Mscr", -1)
    sampRegisterChatCommand("cgo", function ()
        res, x, y, z = getTargetBlipCoordinatesFixed()

        if res then
            cordtp(x, y, z)
        end
    end)
    sampRegisterChatCommand("cgoc", function ()
        if isCharOnFoot(PLAYER_PED) then
            mres, mx, my, mz = SearchMarker()

            if mres then
                cordtp(mx, my, mz)
            end
        end
    end)
    sampRegisterChatCommand("cmenu", function ()
        uv0.v = not uv0.v
    end)

    uv1.ShowCursor = false
    uv1.Process = true

    wait(-1)
end

button = slot4("Режим обходов")

function slot1.OnDrawFrame()
    uv0.ShowCursor = false

    if uv1.v then
        window_f()
    end

    if uv2.v then
        uv1.v = false
        uv0.ShowCursor = true

        uv0.SetNextWindowPos(uv0.ImVec2(uv3 / 2, uv4 / 2), uv0.Cond.FirstUseEver, uv0.ImVec2(0.5, 0.5))
        uv0.SetNextWindowSize(uv0.ImVec2(240 * uv5, 225 * uv5))
        uv0.Begin("obhodi by mscr", uv2, uv0.WindowFlags.NoCollapse + uv0.WindowFlags.NoResize)

        if uv0.Button(button, uv0.ImVec2(-1, 0)) then
            uv6 = not uv6

            if not uv6 then
                button = uv7("Включить режим обходов")
            else
                button = uv7("[Выключить режим обходов]")
            end
        end

        if uv6 then
            uv0.SliderFloat("moveSpeed.x", uv8, -10, 10, format)
            uv0.SliderFloat("moveSpeed.y", uv9, -10, 10, format)
            uv0.SliderFloat("moveSpeed.z", uv10, -10, 10, format)
            uv0.SliderFloat("surfing.x", uv11, -10, 10, format)
            uv0.SliderFloat("surfing.y", uv12, -10, 10, format)
            uv0.SliderFloat("surfing.z", uv13, -10, 10, format)

            if uv0.Checkbox("NOP onSendPlayerSync", uv14) then
                if uv14.v then
                    sendpll = true
                else
                    sendpll = false
                end
            end

            if uv0.Checkbox("NOP onSetPlayerPos", uv15) then
                if uv15.v then
                    setposs = true
                else
                    setposs = false
                end
            end

            if uv0.Button(uv7("Сохранить изменения"), uv0.ImVec2(-1, 0)) then
                uv16.main.bypass = uv6
                uv16.main.mSpeedX = uv8.v
                uv16.main.mSpeedY = uv9.v
                uv16.main.mSpeedZ = uv10.v
                uv16.main.surfX = uv11.v
                uv16.main.surfY = uv12.v
                uv16.main.surfZ = uv13.v
                uv16.main.nopPlayerSync = uv14.v
                uv16.main.nopSetPos = uv15.v

                uv17.save(uv16, "coord.ini")
            end
        end

        uv0.End()
    end
end

function window_f()
    uv0.ShowCursor = true

    uv0.SetNextWindowPos(uv0.ImVec2(uv1 / 2, uv2 / 2), uv0.Cond.FirstUseEver, uv0.ImVec2(0.5, 0.5))
    uv0.SetNextWindowSize(uv0.ImVec2(240 * uv3, 205 * uv3))
    uv0.Begin("mCord by mscr", uv4, uv0.WindowFlags.NoCollapse + uv0.WindowFlags.NoResize)

    if uv5 then
        uv0.TextColoredRGB("Mode: {FF0000}Visual Visible")
    else
        uv0.TextColoredRGB("Mode: {CCFF00}Visual Invisible")
    end

    uv0.Text(" ")
    uv0.SliderInt(uv6("Расстояние"), uv7, 1, 80)
    uv0.SliderInt(uv6("Задержка"), uv8, 0, 5000)
    uv0.SliderInt(uv6("Высота"), uv9, -50, 0)
    uv0.Text(" ")

    if uv0.Button(uv6("Сменить режим видимости"), uv0.ImVec2(-1, 40)) then
        uv5 = not uv5
    end

    if uv0.Button(uv6("Сохранить изменения"), uv0.ImVec2(-1, 0)) then
        uv10.main.time = uv8.v
        uv10.main.delta = uv7.v
        uv10.main.height = uv9.v
        uv10.main.visible = uv5

        uv11.save(uv10, "coord.ini")
    end

    if uv0.Button(uv6("Обходы"), uv0.ImVec2(-1, 0)) then
        uv12.v = not uv12.v
    end

    uv0.End()
end

function cordtp(slot0, slot1, slot2)
    lua_thread.create(function ()
        if uv0 then
            state = true

            freezeCharPosition(PLAYER_PED, true)

            slot0, slot1, slot2 = getCharCoordinates(PLAYER_PED)
            slot3 = getHeadingFromVector2d(uv1 - slot0, uv2 - slot1)

            while uv4.v < math.abs(slot2 - uv3.v) do
                if slot2 < uv3.v then
                    setCharCoordinates(PLAYER_PED, slot0, slot1, slot2 - 1 + uv4.v)
                else
                    setCharCoordinates(PLAYER_PED, slot0, slot1, slot2 - 1 - uv4.v)
                end

                slot0, slot1, slot2 = getCharCoordinates(PLAYER_PED)

                wait(uv5.v)
            end

            setCharCoordinates(PLAYER_PED, slot0, slot1, uv3.v)

            while uv4.v < getDistanceBetweenCoords2d(uv1, uv2, slot0, slot1) do
                setCharCoordinates(PLAYER_PED, slot0 - uv4.v * math.sin(math.rad(slot3)), slot1 + uv4.v * math.cos(math.rad(slot3)), slot2 - 1)

                slot0, slot1, slot2 = getCharCoordinates(PLAYER_PED)
                slot3 = getHeadingFromVector2d(uv1 - slot4, uv2 - slot5)

                wait(uv5.v)
            end

            while uv4.v < math.abs(slot2 - uv6) do
                if slot2 < uv6 then
                    setCharCoordinates(PLAYER_PED, slot0, slot1, slot2 - 1 + uv4.v)
                else
                    setCharCoordinates(PLAYER_PED, slot0, slot1, slot2 - 1 - uv4.v)
                end

                slot0, slot1, slot2 = getCharCoordinates(PLAYER_PED)

                wait(uv5.v)
            end

            setCharCoordinates(PLAYER_PED, uv1, uv2, uv6)

            setposs = false
            sendpll = false

            freezeCharPosition(PLAYER_PED, false)

            state = false
        else
            state = true

            freezeCharPosition(PLAYER_PED, true)

            slot4, slot5, slot2 = getCharCoordinates(PLAYER_PED)

            while true do
                wait(0)

                if uv4.v < getDistanceBetweenCoords2d(slot0, slot1, uv1, uv2) then
                    sendOnFootPosition(slot0, slot1 + math.cos(getAngle(slot0, slot1, uv1, uv2)) * uv4.v, slot2 - uv3.v)
                    wait(uv5.v)
                else
                    setCharCoordinates(PLAYER_PED, uv1, uv2, uv6)

                    setposs = false
                    sendpll = false

                    freezeCharPosition(PLAYER_PED, false)

                    state = false

                    break
                end
            end
        end
    end)
end

function sendOnFootPosition(slot0, slot1, slot2)
    sendOnfootSync(slot0, slot1, slot2)
    sampForceOnfootSync()
end

function slot1.TextColoredRGB(slot0)
    slot2 = uv0.GetStyle().Colors
    slot3 = uv0.ImVec4

    function slot4(slot0)
        return bit.band(bit.rshift(slot0, 24), 255), bit.band(bit.rshift(slot0, 16), 255), bit.band(bit.rshift(slot0, 8), 255), bit.band(slot0, 255)
    end

    function slot5(slot0)
        if slot0:sub(1, 6):upper() == "SSSSSS" then
            return uv1(uv0[1].x, uv0[1].y, uv0[1].z, (tonumber(slot0:sub(7, 8), 16) or uv0[1].w * 255) / 255)
        end

        if type(type(slot0) == "string" and tonumber(slot0, 16) or slot0) ~= "number" then
            return
        end

        slot7, slot8, slot9, slot10 = uv2(slot1)

        return uv3.ImColor(slot2, slot3, slot4, slot5):GetVec4()
    end

    function (slot0)
        for slot4 in slot0:gmatch("[^\r\n]+") do
            slot5 = {}
            slot6 = {}
            slot7 = 1

            while slot4:gsub("{(......)}", "{%1FF}"):find("{........}") do
                slot8, slot9 = slot4:find("{........}")

                if uv0(slot4:sub(slot8 + 1, slot9 - 1)) then
                    slot5[#slot5 + 1] = slot4:sub(slot9 + 1, #slot4)
                    slot5[#slot5] = slot4:sub(slot7, slot8 - 1)
                    slot6[#slot6 + 1] = slot10
                    slot7 = slot8
                end

                slot4 = slot4:sub(1, slot8 - 1) .. slot4:sub(slot9 + 1, #slot4)
            end

            if slot5[0] then
                for slot11 = 0, #slot5, 1 do
                    uv1.TextColored(slot6[slot11] or uv2[1], uv3(slot5[slot11]))
                    uv1.SameLine(nil, 0)
                end

                uv1.NewLine()
            else
                uv1.Text(uv3(slot4))
            end
        end
    end(slot0)
end

function slot0.onSendPlayerSync(slot0)
    if state and uv0 then
        slot0.surfingOffsets.z = uv3.v
        slot0.surfingOffsets.y = uv2.v
        slot0.surfingOffsets.x = uv1.v
        slot0.moveSpeed.z = uv6.v
        slot0.moveSpeed.y = uv5.v
        slot0.moveSpeed.x = uv4.v

        if sendpll then
            return false
        end
    end
end

function slot0.onSetPlayerPos()
    if state and setposs then
        return false
    end
end

function sendOnfootSync(slot0, slot1, slot2)
    slot3 = allocateMemory(68)
    slot4, slot7 = sampGetPlayerIdByCharHandle(PLAYER_PED)

    sampStorePlayerOnfootData(slot5, slot3)
    setStructFloatElement(slot3, 6, slot0, false)
    setStructFloatElement(slot3, 10, slot1, false)
    setStructFloatElement(slot3, 14, slot2, false)
    setStructFloatElement(slot3, 38, 0.9, false)
    setStructFloatElement(slot3, 42, 0.9, false)
    setStructFloatElement(slot3, 46, -0.9, false)
    sampSendOnfootData(slot3)
    freeMemory(slot3)
end

function getTargetBlipCoordinatesFixed()
    slot0, slot1, slot2, slot3 = getTargetBlipCoordinates()

    if not slot0 then
        return false
    end

    requestCollision(slot1, slot2)
    loadScene(slot1, slot2, slot3)

    slot8, slot9, slot10, slot11 = getTargetBlipCoordinates()

    return slot4, slot5, slot6, slot7
end

function getAngle(slot0, slot1, slot2, slot3)
    return math.atan2(slot2 - slot0, slot3 - slot1)
end

function SearchMarker(slot0, slot1, slot2)
    slot3 = 0
    slot4 = 0
    slot5 = 0
    slot6 = false

    for slot10 = 0, 31, 1 do
        slot11 = 0

        if representIntAsFloat(readMemory(13103464 + slot10 * 56 + 0, 4, false)) ~= 0 or representIntAsFloat(readMemory(13103464 + slot10 * 56 + 4, 4, false)) ~= 0 or representIntAsFloat(readMemory(13103464 + slot10 * 56 + 8, 4, false)) ~= 0 then
            slot3 = slot12
            slot4 = representIntAsFloat(readMemory(13103464 + slot10 * 56 + 4, 4, false))
            slot5 = representIntAsFloat(readMemory(13103464 + slot10 * 56 + 8, 4, false))
            slot6 = true
        end
    end

    return slot6, slot3, slot4, slot5
end
 
  • Влюблен
Реакции: NaN.

paulohardy

вы еще постите говно? тогда я иду к вам
Всефорумный модератор
1,907
1,283
Для тех кто пришел за кодом
Lua:
slot0 = require("samp.events")
require("encoding").default = "CP1251"
slot4 = require("encoding").UTF8
slot5, slot6 = getScreenResolution()
slot7 = require("imgui").ImBool(false)
slot8 = require("imgui").ImBool(false)
slot9 = 1.2
setposs = false
sendpll = false

function apply_custom_style()
    slot0 = slot0

    uv0.SwitchContext()

    slot0 = uv0.GetStyle()
    slot0.WindowRounding = 2
    slot0.WindowTitleAlign = uv0.ImVec2(0.5, 0.84)
    slot0.ChildWindowRounding = 2
    slot0.FrameRounding = 2
    slot0.ItemSpacing = uv0.ImVec2(5, 4)
    slot0.ScrollbarSize = 13
    slot0.ScrollbarRounding = 0
    slot0.GrabMinSize = 8
    slot0.GrabRounding = 1
    slot0.Colors[uv0.Col.Text] = slot3(1, 1, 1, 1)
    slot0.Colors[uv0.Col.TextDisabled] = slot3(0.5, 0.5, 0.5, 1)
    slot0.Colors[uv0.Col.WindowBg] = slot3(0.06, 0.06, 0.06, 0.94)
    slot0.Colors[uv0.Col.ChildWindowBg] = slot3(1, 1, 1, 0)
    slot0.Colors[uv0.Col.PopupBg] = slot3(0.08, 0.08, 0.08, 0.94)
    slot0.Colors[uv0.Col.ComboBg] = slot0.Colors[uv0.Col.PopupBg]
    slot0.Colors[uv0.Col.Border] = slot3(0.43, 0.43, 0.5, 0.5)
    slot0.Colors[uv0.Col.BorderShadow] = slot3(0, 0, 0, 0)
    slot0.Colors[uv0.Col.FrameBg] = slot3(0.16, 0.29, 0.48, 0.54)
    slot0.Colors[uv0.Col.FrameBgHovered] = slot3(0.26, 0.59, 0.98, 0.4)
    slot0.Colors[uv0.Col.FrameBgActive] = slot3(0.26, 0.59, 0.98, 0.67)
    slot0.Colors[uv0.Col.TitleBg] = slot3(0.04, 0.04, 0.04, 1)
    slot0.Colors[uv0.Col.TitleBgActive] = slot3(0.16, 0.29, 0.48, 1)
    slot0.Colors[uv0.Col.TitleBgCollapsed] = slot3(0, 0, 0, 0.51)
    slot0.Colors[uv0.Col.MenuBarBg] = slot3(0.14, 0.14, 0.14, 1)
    slot0.Colors[uv0.Col.ScrollbarBg] = slot3(0.02, 0.02, 0.02, 0.53)
    slot0.Colors[uv0.Col.ScrollbarGrab] = slot3(0.31, 0.31, 0.31, 1)
    slot0.Colors[uv0.Col.ScrollbarGrabHovered] = slot3(0.41, 0.41, 0.41, 1)
    slot0.Colors[uv0.Col.ScrollbarGrabActive] = slot3(0.51, 0.51, 0.51, 1)
    slot0.Colors[uv0.Col.CheckMark] = slot3(0.26, 0.59, 0.98, 1)
    slot0.Colors[uv0.Col.SliderGrab] = slot3(0.24, 0.52, 0.88, 1)
    slot0.Colors[uv0.Col.SliderGrabActive] = slot3(0.26, 0.59, 0.98, 1)
    slot0.Colors[uv0.Col.Button] = slot3(0.26, 0.59, 0.98, 0.4)
    slot0.Colors[uv0.Col.ButtonHovered] = slot3(0.26, 0.59, 0.98, 1)
    slot0.Colors[uv0.Col.ButtonActive] = slot3(0.06, 0.53, 0.98, 1)
    slot0.Colors[uv0.Col.Header] = slot3(0.26, 0.59, 0.98, 0.31)
    slot0.Colors[uv0.Col.HeaderHovered] = slot3(0.26, 0.59, 0.98, 0.8)
    slot0.Colors[uv0.Col.HeaderActive] = slot3(0.26, 0.59, 0.98, 1)
    slot0.Colors[uv0.Col.Separator] = slot0.Colors[uv0.Col.Border]
    slot0.Colors[uv0.Col.SeparatorHovered] = slot3(0.26, 0.59, 0.98, 0.78)
    slot0.Colors[uv0.Col.SeparatorActive] = slot3(0.26, 0.59, 0.98, 1)
    slot0.Colors[uv0.Col.ResizeGrip] = slot3(0.26, 0.59, 0.98, 0.25)
    slot0.Colors[uv0.Col.ResizeGripHovered] = slot3(0.26, 0.59, 0.98, 0.67)
    slot0.Colors[uv0.Col.ResizeGripActive] = slot3(0.26, 0.59, 0.98, 0.95)
    slot0.Colors[uv0.Col.CloseButton] = slot3(0.41, 0.41, 0.41, 0.5)
    slot0.Colors[uv0.Col.CloseButtonHovered] = slot3(0.98, 0.39, 0.36, 1)
    slot0.Colors[uv0.Col.CloseButtonActive] = slot3(0.98, 0.39, 0.36, 1)
    slot0.Colors[uv0.Col.PlotLines] = slot3(0.61, 0.61, 0.61, 1)
    slot0.Colors[uv0.Col.PlotLinesHovered] = slot3(1, 0.43, 0.35, 1)
    slot0.Colors[uv0.Col.PlotHistogram] = slot3(0.9, 0.7, 0, 1)
    slot0.Colors[uv0.Col.PlotHistogramHovered] = slot3(1, 0.6, 0, 1)
    slot0.Colors[uv0.Col.TextSelectedBg] = slot3(0.26, 0.59, 0.98, 0.35)
    slot0.Colors[uv0.Col.ModalWindowDarkening] = slot3(0.8, 0.8, 0.8, 0.35)
end

apply_custom_style()

if not doesFileExist("moonloader/config/coord.ini") then
    require("inicfg").save({
        main = {
            delta = 1,
            height = -10,
            time = 0,
            surfX = 0,
            surfZ = 0,
            surfY = 0,
            nopSetPos = false,
            nopPlayerSync = false,
            mSpeedZ = 0,
            mSpeedY = 0,
            visible = true,
            mSpeedX = 0,
            bypass = false
        }
    }, "coord.ini")
end

slot3.save(slot10, "coord.ini")

slot11 = slot1.ImInt(slot3.load(slot10, "coord.ini").main.time)
slot12 = slot1.ImInt(slot3.load(slot10, "coord.ini").main.delta)
slot13 = slot1.ImInt(slot3.load(slot10, "coord.ini").main.height)
slot14 = slot1.ImFloat(slot3.load(slot10, "coord.ini").main.mSpeedX)
slot15 = slot1.ImFloat(slot3.load(slot10, "coord.ini").main.mSpeedY)
slot16 = slot1.ImFloat(slot3.load(slot10, "coord.ini").main.mSpeedZ)
slot17 = slot1.ImFloat(slot3.load(slot10, "coord.ini").main.surfX)
slot18 = slot1.ImFloat(slot3.load(slot10, "coord.ini").main.surfY)
slot19 = slot1.ImFloat(slot3.load(slot10, "coord.ini").main.surfZ)
slot20 = slot1.ImBool(slot3.load(slot10, "coord.ini").main.nopPlayerSync)
slot21 = slot1.ImBool(slot3.load(slot10, "coord.ini").main.nopSetPos)
slot22 = slot3.load(slot10, "coord.ini").main.visible
slot23 = slot3.load(slot10, "coord.ini").main.bypass
format = "%.2f"

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

    sampAddChatMessage("{FF5656}[CoordMaster]: {FFFFFF}Автор:{FF5656} Mscr", -1)
    sampRegisterChatCommand("cgo", function ()
        res, x, y, z = getTargetBlipCoordinatesFixed()

        if res then
            cordtp(x, y, z)
        end
    end)
    sampRegisterChatCommand("cgoc", function ()
        if isCharOnFoot(PLAYER_PED) then
            mres, mx, my, mz = SearchMarker()

            if mres then
                cordtp(mx, my, mz)
            end
        end
    end)
    sampRegisterChatCommand("cmenu", function ()
        uv0.v = not uv0.v
    end)

    uv1.ShowCursor = false
    uv1.Process = true

    wait(-1)
end

button = slot4("Режим обходов")

function slot1.OnDrawFrame()
    uv0.ShowCursor = false

    if uv1.v then
        window_f()
    end

    if uv2.v then
        uv1.v = false
        uv0.ShowCursor = true

        uv0.SetNextWindowPos(uv0.ImVec2(uv3 / 2, uv4 / 2), uv0.Cond.FirstUseEver, uv0.ImVec2(0.5, 0.5))
        uv0.SetNextWindowSize(uv0.ImVec2(240 * uv5, 225 * uv5))
        uv0.Begin("obhodi by mscr", uv2, uv0.WindowFlags.NoCollapse + uv0.WindowFlags.NoResize)

        if uv0.Button(button, uv0.ImVec2(-1, 0)) then
            uv6 = not uv6

            if not uv6 then
                button = uv7("Включить режим обходов")
            else
                button = uv7("[Выключить режим обходов]")
            end
        end

        if uv6 then
            uv0.SliderFloat("moveSpeed.x", uv8, -10, 10, format)
            uv0.SliderFloat("moveSpeed.y", uv9, -10, 10, format)
            uv0.SliderFloat("moveSpeed.z", uv10, -10, 10, format)
            uv0.SliderFloat("surfing.x", uv11, -10, 10, format)
            uv0.SliderFloat("surfing.y", uv12, -10, 10, format)
            uv0.SliderFloat("surfing.z", uv13, -10, 10, format)

            if uv0.Checkbox("NOP onSendPlayerSync", uv14) then
                if uv14.v then
                    sendpll = true
                else
                    sendpll = false
                end
            end

            if uv0.Checkbox("NOP onSetPlayerPos", uv15) then
                if uv15.v then
                    setposs = true
                else
                    setposs = false
                end
            end

            if uv0.Button(uv7("Сохранить изменения"), uv0.ImVec2(-1, 0)) then
                uv16.main.bypass = uv6
                uv16.main.mSpeedX = uv8.v
                uv16.main.mSpeedY = uv9.v
                uv16.main.mSpeedZ = uv10.v
                uv16.main.surfX = uv11.v
                uv16.main.surfY = uv12.v
                uv16.main.surfZ = uv13.v
                uv16.main.nopPlayerSync = uv14.v
                uv16.main.nopSetPos = uv15.v

                uv17.save(uv16, "coord.ini")
            end
        end

        uv0.End()
    end
end

function window_f()
    uv0.ShowCursor = true

    uv0.SetNextWindowPos(uv0.ImVec2(uv1 / 2, uv2 / 2), uv0.Cond.FirstUseEver, uv0.ImVec2(0.5, 0.5))
    uv0.SetNextWindowSize(uv0.ImVec2(240 * uv3, 205 * uv3))
    uv0.Begin("mCord by mscr", uv4, uv0.WindowFlags.NoCollapse + uv0.WindowFlags.NoResize)

    if uv5 then
        uv0.TextColoredRGB("Mode: {FF0000}Visual Visible")
    else
        uv0.TextColoredRGB("Mode: {CCFF00}Visual Invisible")
    end

    uv0.Text(" ")
    uv0.SliderInt(uv6("Расстояние"), uv7, 1, 80)
    uv0.SliderInt(uv6("Задержка"), uv8, 0, 5000)
    uv0.SliderInt(uv6("Высота"), uv9, -50, 0)
    uv0.Text(" ")

    if uv0.Button(uv6("Сменить режим видимости"), uv0.ImVec2(-1, 40)) then
        uv5 = not uv5
    end

    if uv0.Button(uv6("Сохранить изменения"), uv0.ImVec2(-1, 0)) then
        uv10.main.time = uv8.v
        uv10.main.delta = uv7.v
        uv10.main.height = uv9.v
        uv10.main.visible = uv5

        uv11.save(uv10, "coord.ini")
    end

    if uv0.Button(uv6("Обходы"), uv0.ImVec2(-1, 0)) then
        uv12.v = not uv12.v
    end

    uv0.End()
end

function cordtp(slot0, slot1, slot2)
    lua_thread.create(function ()
        if uv0 then
            state = true

            freezeCharPosition(PLAYER_PED, true)

            slot0, slot1, slot2 = getCharCoordinates(PLAYER_PED)
            slot3 = getHeadingFromVector2d(uv1 - slot0, uv2 - slot1)

            while uv4.v < math.abs(slot2 - uv3.v) do
                if slot2 < uv3.v then
                    setCharCoordinates(PLAYER_PED, slot0, slot1, slot2 - 1 + uv4.v)
                else
                    setCharCoordinates(PLAYER_PED, slot0, slot1, slot2 - 1 - uv4.v)
                end

                slot0, slot1, slot2 = getCharCoordinates(PLAYER_PED)

                wait(uv5.v)
            end

            setCharCoordinates(PLAYER_PED, slot0, slot1, uv3.v)

            while uv4.v < getDistanceBetweenCoords2d(uv1, uv2, slot0, slot1) do
                setCharCoordinates(PLAYER_PED, slot0 - uv4.v * math.sin(math.rad(slot3)), slot1 + uv4.v * math.cos(math.rad(slot3)), slot2 - 1)

                slot0, slot1, slot2 = getCharCoordinates(PLAYER_PED)
                slot3 = getHeadingFromVector2d(uv1 - slot4, uv2 - slot5)

                wait(uv5.v)
            end

            while uv4.v < math.abs(slot2 - uv6) do
                if slot2 < uv6 then
                    setCharCoordinates(PLAYER_PED, slot0, slot1, slot2 - 1 + uv4.v)
                else
                    setCharCoordinates(PLAYER_PED, slot0, slot1, slot2 - 1 - uv4.v)
                end

                slot0, slot1, slot2 = getCharCoordinates(PLAYER_PED)

                wait(uv5.v)
            end

            setCharCoordinates(PLAYER_PED, uv1, uv2, uv6)

            setposs = false
            sendpll = false

            freezeCharPosition(PLAYER_PED, false)

            state = false
        else
            state = true

            freezeCharPosition(PLAYER_PED, true)

            slot4, slot5, slot2 = getCharCoordinates(PLAYER_PED)

            while true do
                wait(0)

                if uv4.v < getDistanceBetweenCoords2d(slot0, slot1, uv1, uv2) then
                    sendOnFootPosition(slot0, slot1 + math.cos(getAngle(slot0, slot1, uv1, uv2)) * uv4.v, slot2 - uv3.v)
                    wait(uv5.v)
                else
                    setCharCoordinates(PLAYER_PED, uv1, uv2, uv6)

                    setposs = false
                    sendpll = false

                    freezeCharPosition(PLAYER_PED, false)

                    state = false

                    break
                end
            end
        end
    end)
end

function sendOnFootPosition(slot0, slot1, slot2)
    sendOnfootSync(slot0, slot1, slot2)
    sampForceOnfootSync()
end

function slot1.TextColoredRGB(slot0)
    slot2 = uv0.GetStyle().Colors
    slot3 = uv0.ImVec4

    function slot4(slot0)
        return bit.band(bit.rshift(slot0, 24), 255), bit.band(bit.rshift(slot0, 16), 255), bit.band(bit.rshift(slot0, 8), 255), bit.band(slot0, 255)
    end

    function slot5(slot0)
        if slot0:sub(1, 6):upper() == "SSSSSS" then
            return uv1(uv0[1].x, uv0[1].y, uv0[1].z, (tonumber(slot0:sub(7, 8), 16) or uv0[1].w * 255) / 255)
        end

        if type(type(slot0) == "string" and tonumber(slot0, 16) or slot0) ~= "number" then
            return
        end

        slot7, slot8, slot9, slot10 = uv2(slot1)

        return uv3.ImColor(slot2, slot3, slot4, slot5):GetVec4()
    end

    function (slot0)
        for slot4 in slot0:gmatch("[^\r\n]+") do
            slot5 = {}
            slot6 = {}
            slot7 = 1

            while slot4:gsub("{(......)}", "{%1FF}"):find("{........}") do
                slot8, slot9 = slot4:find("{........}")

                if uv0(slot4:sub(slot8 + 1, slot9 - 1)) then
                    slot5[#slot5 + 1] = slot4:sub(slot9 + 1, #slot4)
                    slot5[#slot5] = slot4:sub(slot7, slot8 - 1)
                    slot6[#slot6 + 1] = slot10
                    slot7 = slot8
                end

                slot4 = slot4:sub(1, slot8 - 1) .. slot4:sub(slot9 + 1, #slot4)
            end

            if slot5[0] then
                for slot11 = 0, #slot5, 1 do
                    uv1.TextColored(slot6[slot11] or uv2[1], uv3(slot5[slot11]))
                    uv1.SameLine(nil, 0)
                end

                uv1.NewLine()
            else
                uv1.Text(uv3(slot4))
            end
        end
    end(slot0)
end

function slot0.onSendPlayerSync(slot0)
    if state and uv0 then
        slot0.surfingOffsets.z = uv3.v
        slot0.surfingOffsets.y = uv2.v
        slot0.surfingOffsets.x = uv1.v
        slot0.moveSpeed.z = uv6.v
        slot0.moveSpeed.y = uv5.v
        slot0.moveSpeed.x = uv4.v

        if sendpll then
            return false
        end
    end
end

function slot0.onSetPlayerPos()
    if state and setposs then
        return false
    end
end

function sendOnfootSync(slot0, slot1, slot2)
    slot3 = allocateMemory(68)
    slot4, slot7 = sampGetPlayerIdByCharHandle(PLAYER_PED)

    sampStorePlayerOnfootData(slot5, slot3)
    setStructFloatElement(slot3, 6, slot0, false)
    setStructFloatElement(slot3, 10, slot1, false)
    setStructFloatElement(slot3, 14, slot2, false)
    setStructFloatElement(slot3, 38, 0.9, false)
    setStructFloatElement(slot3, 42, 0.9, false)
    setStructFloatElement(slot3, 46, -0.9, false)
    sampSendOnfootData(slot3)
    freeMemory(slot3)
end

function getTargetBlipCoordinatesFixed()
    slot0, slot1, slot2, slot3 = getTargetBlipCoordinates()

    if not slot0 then
        return false
    end

    requestCollision(slot1, slot2)
    loadScene(slot1, slot2, slot3)

    slot8, slot9, slot10, slot11 = getTargetBlipCoordinates()

    return slot4, slot5, slot6, slot7
end

function getAngle(slot0, slot1, slot2, slot3)
    return math.atan2(slot2 - slot0, slot3 - slot1)
end

function SearchMarker(slot0, slot1, slot2)
    slot3 = 0
    slot4 = 0
    slot5 = 0
    slot6 = false

    for slot10 = 0, 31, 1 do
        slot11 = 0

        if representIntAsFloat(readMemory(13103464 + slot10 * 56 + 0, 4, false)) ~= 0 or representIntAsFloat(readMemory(13103464 + slot10 * 56 + 4, 4, false)) ~= 0 or representIntAsFloat(readMemory(13103464 + slot10 * 56 + 8, 4, false)) ~= 0 then
            slot3 = slot12
            slot4 = representIntAsFloat(readMemory(13103464 + slot10 * 56 + 4, 4, false))
            slot5 = representIntAsFloat(readMemory(13103464 + slot10 * 56 + 8, 4, false))
            slot6 = true
        end
    end

    return slot6, slot3, slot4, slot5
end
спс за 450 строк декомпила, так трудно было достать