Вопросы по Lua скриптингу

Общая тема для вопросов по разработке скриптов на языке программирования Lua, в частности под MoonLoader.
  • Задавая вопрос, убедитесь, что его нет в списке частых вопросов и что на него ещё не отвечали (воспользуйтесь поиском).
  • Поищите ответ в теме посвященной разработке Lua скриптов в MoonLoader
  • Отвечая, убедитесь, что ваш ответ корректен.
  • Старайтесь как можно точнее выразить мысль, а если проблема связана с кодом, то обязательно прикрепите его к сообщению, используя блок [code=lua]здесь мог бы быть ваш код[/code].
  • Если вопрос связан с MoonLoader-ом первым делом желательно поискать решение на wiki.

Частые вопросы

Как научиться писать скрипты? С чего начать?
Информация - Гайд - Всё о Lua скриптинге для MoonLoader(https://blast.hk/threads/22707/)
Как вывести текст на русском? Вместо русского текста у меня какие-то каракули.
Изменить кодировку файла скрипта на Windows-1251. В Atom: комбинация клавиш Ctrl+Shift+U, в Notepad++: меню Кодировки -> Кодировки -> Кириллица -> Windows-1251.
Как получить транспорт, в котором сидит игрок?
Lua:
local veh = storeCarCharIsInNoSave(PLAYER_PED)
Как получить свой id или id другого игрока?
Lua:
local _, id = sampGetPlayerIdByCharHandle(PLAYER_PED) -- получить свой ид
local _, id = sampGetPlayerIdByCharHandle(ped) -- получить ид другого игрока. ped - это хендл персонажа
Как проверить, что строка содержит какой-то текст?
Lua:
if string.find(str, 'текст', 1, true) then
-- строка str содержит "текст"
end
Как эмулировать нажатие игровой клавиши?
Lua:
local game_keys = require 'game.keys' -- где-нибудь в начале скрипта вне функции main

setGameKeyState(game_keys.player.FIREWEAPON, -1) -- будет сэмулировано нажатие клавиши атаки
Все иды клавиш находятся в файле moonloader/lib/game/keys.lua.
Подробнее о функции setGameKeyState здесь: lua - setgamekeystate | BlastHack — DEV_WIKI(https://www.blast.hk/wiki/lua:setgamekeystate)
Как получить id другого игрока, в которого целюсь я?
Lua:
local valid, ped = getCharPlayerIsTargeting(PLAYER_HANDLE) -- получить хендл персонажа, в которого целится игрок
if valid and doesCharExist(ped) then -- если цель есть и персонаж существует
  local result, id = sampGetPlayerIdByCharHandle(ped) -- получить samp-ид игрока по хендлу персонажа
  if result then -- проверить, прошло ли получение ида успешно
    -- здесь любые действия с полученным идом игрока
  end
end
Как зарегистрировать команду чата SAMP?
Lua:
-- До бесконечного цикла/задержки
sampRegisterChatCommand("mycommand", function (param)
     -- param будет содержать весь текст введенный после команды, чтобы разделить его на аргументы используйте string.match()
    sampAddChatMessage("MyCMD", -1)
end)
Крашит игру при вызове sampSendChat. Как это исправить?
Это происходит из-за бага в SAMPFUNCS, когда производится попытка отправки пакета определенными функциями изнутри события исходящих RPC и пакетов. Исправления для этого бага нет, но есть способ не провоцировать его. Вызов sampSendChat изнутри обработчика исходящих RPC/пакетов нужно обернуть в скриптовый поток с нулевой задержкой:
Lua:
function onSendRpc(id)
  -- крашит:
  -- sampSendChat('Send RPC: ' .. id)

  -- норм:
  lua_thread.create(function()
    wait(0)
    sampSendChat('Send RPC: ' .. id)
  end)
end
 
Последнее редактирование:

7 СМЕРТНЫХ ГРЕХОВ

Известный
515
159
когда используется цикл for i = 0, 2 то нельзя нажать на клавишу F3, можно ли как то сделать действие при нажатии клавиши F3 не дожидаясь конца цикла for ?


LUA:
if isKeyJustPressed(0x71) then -- F2
  for id = 0, 2 do
      sampAddChatMessage(id, -1)
      wait(math.random(5000, 10000))
   end
end
if isKeyJustPressed(0x72) then -- F3
   --действие
end
 

MrDorlik

Известный
971
394
Эта клавиша TOGGLESUBMISSION = 19 (lib > game > keys.lua) есть в onSendPlayerSync?
Не могу заставить её нормально нажиматься через setGameKeyState, нажимается в рандомное время, хотя задержка 3 секунды стоит.
да нормально отправляется вроде, 512 keysData отправляется
когда используется цикл for i = 0, 2 то нельзя нажать на клавишу F3, можно ли как то сделать действие при нажатии клавиши F3 не дожидаясь конца цикла for ?


LUA:
if isKeyJustPressed(0x71) then -- F2
  for id = 0, 2 do
      sampAddChatMessage(id, -1)
      wait(math.random(5000, 10000))
   end
end
if isKeyJustPressed(0x72) then -- F3
   --действие
end
ну конечно нельзя нажать потому что ты весь цикл морозишь, создавай отдельные потоки под каждую кнопку тогда, другое решение мне лень придумывать
 

kuboni

Участник
112
2
function OnIncomingPacket(id, data, length)
if id == 207 then
if data.sendKey == 4 then
-- Thực hiện teleport khoảng cách 5 mét
local x, y, z = sampGetPlayerPos()
local angle = sampGetPlayerFacingAngle()
local newX = x + 5 * math.sin(math.rad(angle))
local newY = y + 5 * math.cos(math.rad(angle))
sampSetPlayerPos(newX, newY, z)

-- Trả về ID = 0
data.animationId = 0
end

local newData = {}
for i = 1, length do
newData = data
end

return true -- Chặn packet
end

return false -- Chuyển tiếp packet
end
When I send id =4 why doesn't it teleport me about 5m away?
 

хромиус)

:steamhappy:
Друг
5,012
3,272
  • Нравится
  • Влюблен
Реакции: percheklii и minxty

percheklii

Известный
749
279
Who can teleport by left clicking
are you about it?
 
  • Нравится
Реакции: kuboni

kuboni

Участник
112
2
bạn có về nó không?
[URL mở ra="true"]https://www.blast.hk/threads/15459/[/URL]
thanks bro

function samp.onSendPlayerSync(data)
if send then -- Kiểm tra biến enableSync để quyết định việc thực hiện mã hay không
if data.keysData == 160 then
data.keysData = 0
end
if data.weapon == 44 or data.weapon == 45 or data.weapon == 46 then
data.weapon = 0
end
if data.animationId ~= 0 then
data.animationId = 0
end
if data.keysData == 4 then
if data.leftRightKeys == 128 then
data.leftRightKeys = nil
end
if data.leftRightKeys == 65408 then
data.leftRightKeys = nil
end
if data.upDownKeys == 128 then
data.upDownKeys = nil
end
if data.upDownKeys == 65408 then
data.upDownKeys = nil
end
end
end
end
Someone help me please? When I send datakey id=4, can it move where I am standing 500m away?
 
Последнее редактирование:

Riza

Новичок
9
1
Ребята, помогите, вникаю в код LUA - начал изучени. Я чайник. Прошу не критиковать.
Пытаюсь переделать бота RudBot (автора не помню) на [ARZ] Бот лесопилка - автор кода не я.
BegInToPoint:
local ev = require("lib.samp.events")
local imgui = require("imgui")
local encoding = require ("encoding")
encoding.default = 'CP1251'
local u8 = encoding.UTF8

function imgui.BeforeDrawFrame()

    if font28 == nil then
        font28 = imgui.GetIO().Fonts:AddFontFromFileTTF(getFolderPath(0x14) .. '\\trebucbd.ttf', 28.0, nil, imgui.GetIO().Fonts:GetGlyphRangesCyrillic())
    end
    if font24 == nil then
        font24 = imgui.GetIO().Fonts:AddFontFromFileTTF(getFolderPath(0x14) .. '\\trebucbd.ttf', 24.0, nil, imgui.GetIO().Fonts:GetGlyphRangesCyrillic())
    end
    if font20 == nil then
        font20 = imgui.GetIO().Fonts:AddFontFromFileTTF(getFolderPath(0x14) .. '\\trebucbd.ttf', 20.0, nil, imgui.GetIO().Fonts:GetGlyphRangesCyrillic())
    end
    if font18 == nil then
        font18 = imgui.GetIO().Fonts:AddFontFromFileTTF(getFolderPath(0x14) .. '\\trebucbd.ttf', 18.0, nil, imgui.GetIO().Fonts:GetGlyphRangesCyrillic())
    end

end

local bot = {
    menu = imgui.ImBool(false),
    active = imgui.ImBool(false),
    laps = imgui.ImInt(999),
    jump_bot = imgui.ImBool(false),
    sprint_bot = imgui.ImBool(false)
}

local bstatus = 0
local STATUS = {
    CARRIAGE = 1,
    unload = 2
}

local stat = {
    laps_all = 0
}

function main()
    repeat wait(0) until isSampAvailable()
    sampRegisterChatCommand("bbot", function()
        bot.menu.v = not bot.menu.v
        imgui.Process = bot.menu.v
    end)
    while true do wait(0)
        if not bot.active.v then stat.laps_all = 0 end

        if bot.active.v then

            for _, v in pairs(getAllObjects()) do
                if sampGetObjectSampIdByHandle(v) ~= -1 then
                    if getObjectModel(v) == 1415 then
                        setObjectCollision(v, false)
                    end
                end
            end

            math.randomseed(os.time())
            local rand = math.random(1, 2)
            if rand == 1 then
                if bstatus == STATUS.CARRIAGE then

                    sampAddChatMessage("{1F1F1F}|   [Ru{171717}dBo{111111}t] : {C1C1C1} Я начал новй круг. Может, уже хаватит?", 0xA9A9A9)

                    BeginToPoint(-494.0812, -163.6125, 78.3988, 1.000000, -255, true)           
                    BeginToPoint(-512.6366, -190.9383, 78.2589, 1.000000, -255, false)
                    BeginToPoint(-498.5284, -152.9090, 75.4740, 1.000000, -255, true)
                    BeginToPoint(-512.6366, -190.9383, 78.2589, 1.000000, -255, false)
                    BeginToPoint(-523.4792, -152.0980, 75.4329, 1.000000, -255, true)
                    BeginToPoint(-512.6366, -190.9383, 78.2589, 1.000000, -255, false)
                    BeginToPoint(-525.3253, -130.7178, 69.7273, 1.000000, -255, true)
                    BeginToPoint(-512.6366, -190.9383, 78.2589, 1.000000, -255, false)
                    BeginToPoint(-497.5557, -116.2624, 64.8875, 1.000000, -255, true)
                    BeginToPoint(-512.6366, -190.9383, 78.2589, 1.000000, -255, false)

                    bstatus = STATUS.CARRIAGE
                end
            elseif rand == 2 then
                return false
            end
            
            
        end
      
 
    end
end

function ev.onShowTextDraw(id, data)
    if bot.active.v then
        if data.modelId == 541 or 542 or 543 then
            sampSendClickTextdraw(541 or 542 or 543)
        end
    end
end

function imgui.OnDrawFrame()
    if not bot.menu.v then imgui.Process = false end

    if bot.menu.v then

        local r,g,b,a = rainbow(1, 1)
        local a = a / 1
        local r = r / 1
        local g = g / 1
        local b = b / 1

        local sizeX, sizeY = getScreenResolution()
        imgui.SetNextWindowPos(imgui.ImVec2(sizeX / 2, sizeY / 2), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
        imgui.SetNextWindowSize(imgui.ImVec2(400, 300), imgui.Cond.FirstUseEver)

        imgui.PushStyleColor(imgui.Col.Text, imgui.ImVec4(r, g, b, 1.00))
        imgui.Begin(u8"##Loader BOT by Scar & Downesa", bot.menu, imgui.WindowFlags.NoResize + imgui.WindowFlags.NoCollapse)

            imgui.PushFont(font28)
            imgui.CenterTextColoredRGB(("DebilBot"))
            imgui.PopFont()
            imgui.NewLine()

            imgui.PushStyleColor(imgui.Col.Text, imgui.ImVec4(0.86, 0.93, 0.89, 1.00))
            imgui.BeginChild(u8"##Child", imgui.ImVec2(384, 200), true)
                imgui.NewLine()

                    imgui.PushFont(font24)
                    imgui.PushItemWidth(366)
                    imgui.InputInt(u8"##laps", bot.laps)
                    imgui.PopItemWidth()

                    imgui.NewLine()

                


                

                    imgui.NewLine()

                    if not bot.active.v then
                        if imgui.Button(u8"Включить", imgui.ImVec2(366, 45)) then
                            bot.active.v = not bot.active.v
                            bstatus = STATUS.CARRIAGE
                            stat.laps_all = 0
                        end
                    else
                        if imgui.Button(u8"Выключить", imgui.ImVec2(366, 45)) then
                            bot.active.v = not bot.active.v
                            bstatus = 0
                            stat.laps_all = 0
                        end
                    end
                    imgui.PopFont()

                imgui.NewLine()
            imgui.EndChild("##Child")
            imgui.PopStyleColor(1)
            
        

        imgui.End()
        imgui.PopStyleColor(1)

    end

end

function rainbow(speed, alpha)
    return math.floor(math.sin(os.clock() * speed) * 127 + 128), math.floor(math.sin(os.clock() * speed + 2) * 127 + 128), math.floor(math.sin(os.clock() * speed + 4) * 127 + 128), alpha
end

function join_argb(a, r, g, b)
    local argb = b
    argb = bit.bor(argb, bit.lshift(g, 8))
    argb = bit.bor(argb, bit.lshift(r, 16))
    argb = bit.bor(argb, bit.lshift(a, 24))
    return argb
end

function imgui.TextColoredRGB(text)
    local style = imgui.GetStyle()
    local colors = style.Colors
    local ImVec4 = imgui.ImVec4

    local explode_argb = function(argb)
        local a = bit.band(bit.rshift(argb, 24), 0xFF)
        local r = bit.band(bit.rshift(argb, 16), 0xFF)
        local g = bit.band(bit.rshift(argb, 8), 0xFF)
        local b = bit.band(argb, 0xFF)
        return a, r, g, b
    end

    local getcolor = function(color)
        if color:sub(1, 6):upper() == 'SSSSSS' then
            local r, g, b = colors[1].x, colors[1].y, colors[1].z
            local a = tonumber(color:sub(7, 8), 16) or colors[1].w * 255
            return ImVec4(r, g, b, a / 255)
        end
        local color = type(color) == 'string' and tonumber(color, 16) or color
        if type(color) ~= 'number' then return end
        local r, g, b, a = explode_argb(color)
        return imgui.ImColor(r, g, b, a):GetVec4()
    end

    local render_text = function(text_)
        for w in text_:gmatch('[^\r\n]+') do
            local text, colors_, m = {}, {}, 1
            w = w:gsub('{(......)}', '{%1FF}')
            while w:find('{........}') do
                local n, k = w:find('{........}')
                local color = getcolor(w:sub(n + 1, k - 1))
                if color then
                    text[#text], text[#text + 1] = w:sub(m, n - 1), w:sub(k + 1, #w)
                    colors_[#colors_ + 1] = color
                    m = n
                end
                w = w:sub(1, n - 1) .. w:sub(k + 1, #w)
            end
            if text[0] then
                for i = 0, #text do
                    imgui.TextColored(colors_[i] or colors[1], u8(text[i]))
                    imgui.SameLine(nil, 0)
                end
                imgui.NewLine()
            else imgui.Text(u8(w)) end
        end
    end

    render_text(text)
end

function imgui.CenterTextColoredRGB(text)
    local width = imgui.GetWindowWidth()
    local style = imgui.GetStyle()
    local colors = style.Colors
    local ImVec4 = imgui.ImVec4

    local explode_argb = function(argb)
        local a = bit.band(bit.rshift(argb, 24), 0xFF)
        local r = bit.band(bit.rshift(argb, 16), 0xFF)
        local g = bit.band(bit.rshift(argb, 8), 0xFF)
        local b = bit.band(argb, 0xFF)
        return a, r, g, b
    end

    local getcolor = function(color)
        if color:sub(1, 6):upper() == 'SSSSSS' then
            local r, g, b = colors[1].x, colors[1].y, colors[1].z
            local a = tonumber(color:sub(7, 8), 16) or colors[1].w * 255
            return ImVec4(r, g, b, a / 255)
        end
        local color = type(color) == 'string' and tonumber(color, 16) or color
        if type(color) ~= 'number' then return end
        local r, g, b, a = explode_argb(color)
        return imgui.ImColor(r, g, b, a):GetVec4()
    end

    local render_text = function(text_)
        for w in text_:gmatch('[^\r\n]+') do
            local textsize = w:gsub('{.-}', '')
            local text_width = imgui.CalcTextSize(u8(textsize))
            imgui.SetCursorPosX( width / 2 - text_width .x / 2 )
            local text, colors_, m = {}, {}, 1
            w = w:gsub('{(......)}', '{%1FF}')
            while w:find('{........}') do
                local n, k = w:find('{........}')
                local color = getcolor(w:sub(n + 1, k - 1))
                if color then
                    text[#text], text[#text + 1] = w:sub(m, n - 1), w:sub(k + 1, #w)
                    colors_[#colors_ + 1] = color
                    m = n
                end
                w = w:sub(1, n - 1) .. w:sub(k + 1, #w)
            end
            if text[0] then
                for i = 0, #text do
                    imgui.TextColored(colors_[i] or colors[1], u8(text[i]))
                    imgui.SameLine(nil, 0)
                end
                imgui.NewLine()
            else
                imgui.Text(u8(w))
            end
        end
    end
    render_text(text)
end

function renderLine(x2, y2, z2)
    if isPointOnScreen(x2, y2, z2, 0.0) then
        local x1, y1, z1 = getCharCoordinates(PLAYER_PED)
        local x3, y3 = convert3DCoordsToScreen(x1, y1, z1)
        local x4, y4 = convert3DCoordsToScreen(x2, y2, z2)
        renderDrawLine(x3, y3, x4, y4, 3, 0xFFDC2B2B)
        renderDrawPolygon(x3, y3, 8, 8, 16, 0.0, 0xFFDC2B2B)
        renderDrawPolygon(x4, y4, 8, 8, 16, 0.0, 0xFFDC2B2B)
    end
end

--RUN

function BeginToPoint(x, y, z, radius, move_code, isSprint)
    repeat
        local posX, posY, posZ = GetCoordinates()
        local dist = getDistanceBetweenCoords3d(x, y, z, posX, posY, z)
        setAngle(x, y, dist, 0.1)
        MovePlayer(move_code, isSprint)
        wait(0)
    until not bot.active.v or dist < radius --вот оно
end

function GetCoordinates()
    if isCharInAnyCar(playerPed) then
        local car = storeCarCharIsInNoSave(playerPed)
        return getCarCoordinates(car)
    else
        return getCharCoordinates(playerPed)
    end
end

function setAngle(x, y, distance, speed)
    local source_x = fix(representIntAsFloat(readMemory(0xB6F248, 4, false)))
    local source_z = fix(representIntAsFloat(readMemory(0xB6F258, 4, false))) + math.pi
    local angle = GetAngleBeetweenTwoPoints(x,y) - source_z - math.pi

    if distance > 1.8 then
        if angle > -0.1 and angle < 0.03 then setCameraPositionUnfixed(-0.3, GetAngleBeetweenTwoPoints(x,y))
        elseif angle < -5.7 and angle > -5.93 then setCameraPositionUnfixed(-0.3, GetAngleBeetweenTwoPoints(x,y))
        elseif angle < -6.0 and angle > -6.4 then setCameraPositionUnfixed(-0.3, GetAngleBeetweenTwoPoints(x,y))
        elseif angle > 0.04 then setCameraPositionUnfixed(-0.3, fix(representIntAsFloat(readMemory(0xB6F258, 4, false)))+speed)
        elseif angle < -3.5 and angle > -5.67 then setCameraPositionUnfixed(-0.3, fix(representIntAsFloat(readMemory(0xB6F258, 4, false)))+speed)
        else setCameraPositionUnfixed(-0.3, fix(representIntAsFloat(readMemory(0xB6F258, 4, false)))-speed)
        end
    else setCameraPositionUnfixed(source_x, GetAngleBeetweenTwoPoints(x,y)) end
end

function fix(angle)
    while angle > math.pi do
        angle = angle - (math.pi*2)
    end
    while angle < -math.pi do
        angle = angle + (math.pi*2)
    end
    return angle
end

function GetAngleBeetweenTwoPoints(x2,y2)
    local x1, y1, z1 = getCharCoordinates(playerPed)
    local plus = 0.0
    local mode = 1
    if x1 < x2 and y1 > y2 then plus = math.pi/2; mode = 2; end
    if x1 < x2 and y1 < y2 then plus = math.pi; end
    if x1 > x2 and y1 < y2 then plus = math.pi*1.5; mode = 2; end
    local lx = x2 - x1
    local ly = y2 - y1
    lx = math.abs(lx)
    ly = math.abs(ly)
    if mode == 1 then ly = ly/lx;
    else ly = lx/ly; end
    ly = math.atan(ly)
    ly = ly + plus
    return ly
end

function MovePlayer(move_code, isSprint, isJumping)
    setGameKeyState(1, move_code)
    --[[255 - пїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅ
       -255 - пїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅ
      65535 - пїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅ
     -65535 - пїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅ]]
    lua_thread.create(function()
        if isJumping then
            local rand = math.random(0, 9999999);
            if rand >= 9909999 then
                isSprint = false
                setGameKeyState(14, 255);
                wait(200)
                isSprint = true
            end
        end
    end)
    if isSprint then setGameKeyState(16, 25) end
end

function bluetheme()
    imgui.SwitchContext()
    local colors = imgui.GetStyle().Colors;
    local icol = imgui.Col
    local ImVec4 = imgui.ImVec4

    imgui.GetStyle().WindowPadding = imgui.ImVec2(8, 1)
    imgui.GetStyle().WindowRounding = 16.0
    imgui.GetStyle().FramePadding = imgui.ImVec2(1, 3)
    imgui.GetStyle().ItemSpacing = imgui.ImVec2(1, 4)
    imgui.GetStyle().ItemInnerSpacing = imgui.ImVec2(1, 1)
    imgui.GetStyle().IndentSpacing = 9.0
    imgui.GetStyle().ScrollbarSize = 1.0
    imgui.GetStyle().ScrollbarRounding = 116.0
    imgui.GetStyle().GrabMinSize = 7.0
    imgui.GetStyle().GrabRounding = 6.0
    imgui.GetStyle().ChildWindowRounding = 9.0
    imgui.GetStyle().FrameRounding = 9.0

    colors[icol.Text]                   = ImVec4(0.90, 0.90, 0.90, 1.00);
    colors[icol.TextDisabled]           = ImVec4(0.60, 0.60, 0.60, 1.00);
    colors[icol.WindowBg]               = ImVec4(0.04, 0.04, 0.04, 1.00);

    colors[icol.ChildWindowBg]          = ImVec4(0.13, 0.13, 0.13, 1.00);
    colors[icol.PopupBg]                = ImVec4(0.04, 0.04, 0.04, 1.00);

    colors[icol.Border]                 = ImVec4(0.04, 0.04, 0.04, 1.00);
    colors[icol.BorderShadow]           = ImVec4(0.04, 0.04, 0.04, 1.00);
    colors[icol.FrameBg]                = ImVec4(0.04, 0.04, 0.04, 0.59);
    colors[icol.FrameBgHovered]         = ImVec4(0.04, 0.04, 0.04, 0.88);
    colors[icol.FrameBgActive]          = ImVec4(0.28, 0.5, 1.00, 1.00);
    colors[icol.TitleBg]                = ImVec4(0.04, 0.04, 0.04, 1.00);
    colors[icol.TitleBgActive]          = ImVec4(0.04, 0.04, 0.04, 1.00);
    colors[icol.TitleBgCollapsed]       = ImVec4(0.04, 0.04, 0.04, 1.00);
    colors[icol.MenuBarBg]              = ImVec4(0.04, 0.04, 0.04, 0.75);
    colors[icol.ScrollbarBg]            = ImVec4(0.04, 0.0, 0.04, 1.00);

    colors[icol.ScrollbarGrab]          = ImVec4(0.04, 0.04, 0.04, 0.68);
    colors[icol.ScrollbarGrabHovered]   = ImVec4(0.04, 0.04, 0.04, 1.00);
    colors[icol.ScrollbarGrabActive]    = ImVec4(0.04, 0.04, 0.04, 1.00);
    colors[icol.ComboBg]                = ImVec4(0.04, 0.04, 0.04, 0.79);
    colors[icol.CheckMark]              = ImVec4(1.000, 0.000, 0.000, 1.000)
    colors[icol.SliderGrab]             = ImVec4(0.03, 0.04, 0.04, 1.000)
    colors[icol.SliderGrabActive]       = ImVec4(0.66, 0.66, 0.66, 1.00);
    colors[icol.Button]                 = ImVec4(0.04, 0.04, 0.04, 1.00);
    colors[icol.ButtonHovered]          = ImVec4(0.04, 0.04, 0.04, 0.59);
    colors[icol.ButtonActive]           = ImVec4(0.04, 0.04, 0.04, 1.00);
    colors[icol.Header]                 = ImVec4(0.04, 0.04, 0.04, 1.00);
    colors[icol.HeaderHovered]          = ImVec4(0.04, 0.04, 0.04, 0.74);
    colors[icol.HeaderActive]           = ImVec4(0.04, 0.04, 0.04, 1.00);
    colors[icol.Separator]              = ImVec4(0.37, 0.37, 0.37, 1.00);
    colors[icol.SeparatorHovered]       = ImVec4(0.60, 0.60, 0.70, 1.00);
    colors[icol.SeparatorActive]        = ImVec4(0.70, 0.70, 0.90, 1.00);
    colors[icol.ResizeGrip]             = ImVec4(1.00, 1.00, 1.00, 0.30);
    colors[icol.ResizeGripHovered]      = ImVec4(1.00, 1.00, 1.00, 0.60);
    colors[icol.ResizeGripActive]       = ImVec4(1.00, 1.00, 1.00, 0.90);
    colors[icol.CloseButton]            = ImVec4(0.00, 0.00, 0.00, 0.00);
    colors[icol.CloseButtonHovered]     = ImVec4(0.00, 0.00, 0.00, 0.60);
    colors[icol.CloseButtonActive]      = ImVec4(0.35, 0.35, 0.35, 1.00);
    colors[icol.PlotLines]              = ImVec4(1.00, 1.00, 1.00, 1.00);
    colors[icol.PlotLinesHovered]       = ImVec4(0.90, 0.70, 0.00, 1.00);
    colors[icol.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00);
    colors[icol.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00);
    colors[icol.TextSelectedBg]         = ImVec4(0.00, 0.00, 1.00, 0.00);
    colors[icol.ModalWindowDarkening]   = ImVec4(0.20, 0.20, 0.20, 0.35);
end
bluetheme()
Как сделать так, чтобы после "BeginToPoint (Выделил строчки) - после данных координат он нажимал ALT, ждал и бежал дальше. Не понимаю как интегрировать нажатие setGameKeyState -помогите - заранее спасибо!
 

Kolson

Участник
7
0
Как встроить lua (например на gta sa mobile знаю что уже есть это для примера) можете подсказать или может быть есть у кого урок
 
Последнее редактирование:

sssilvian

Активный
239
25
Есть ли способ заблокировать кнопку огня, когда функция .ini включена, или заблокировать нанесение урона игрокам с помощью определенного оружия (снайперской винтовки)?
 

хромиус)

:steamhappy:
Друг
5,012
3,272
Does anyone have the most basic teleport soucer?