Вопросы по 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
 
Последнее редактирование:

Ononimus

Потрачен
60
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
if imgui.CollapsingHeader('Mafia Helper') then
-- code
end
спасибо оченнь помогаешь))

if imgui.CollapsingHeader('Mafia Helper') then
-- code
ограменющее спасибо работает

Снова я я новичок в луа спраиваю тут часто) так вот как мне изменить имгуи на красивый допустим у меня вот есть код (ниже прелажу

код:
local imgui = require 'mimgui'
local wm = require 'windows.message'
local vkeys = require 'vkeys'

local sw, sh = 500, 300
local active = imgui.new.bool(false)
local checkbox = imgui.new.bool(false)

function onWindowMessage(msg, wparam, lparam)
    if msg == wm.WM_KEYUP and wparam == vkeys.VK_M then
        active[0] = not active[0]
    end
end

imgui.OnInitialize(function()
    imgui.GetIO().IniFilename = nil
    imgui.StyleColorsLight()
end)

local mainFrame = imgui.OnFrame(function() return active[0] end, function(self)
    imgui.SetNextWindowSize(imgui.ImVec2(sw, sh), imgui.Cond.FirstUseEver)
    imgui.Begin('Mafia Helper V - 0.1', active)
    if imgui.BeginTabBar('Tabs') then
        if imgui.BeginTabItem('О хелпере.') then
            imgui.Text('Хелпер офицально начал работать xx:09:22.')
            imgui.Text('данный хелпере был создан исключительно для проекта Online RP')
            imgui.Text('на многих серверах хелпер может не работать.')
            imgui.Text('Справка - Данный хелпер не несет ответсветсвенности')
            imgui.Text('за извененение потустороних лиц')
            imgui.Text('стилеры, вирусы, и так далее. Качать хелпер')
            imgui.Text('Исключительнно с нашей офицальной группы во ВКонтакте.')
        if imgui.CollapsingHeader('Mafia Helper - обратная связь') then
            imgui.Text('VKontakte - НЕТУ ЕЩЕ А ЕЩЕ КИРИЛЛ ЛОХ')
        end
            imgui.EndTabItem()
        end
        if imgui.BeginTabItem('Для лидеров.') then
            imgui.Checkbox('Показывать онлайн за день без афк', checkbox)
            imgui.EndTabItem()
        end
        if imgui.BeginTabItem('Оружие.') then
            imgui.Text('Tab 3')
            imgui.Checkbox('Tab 3', checkbox)
            imgui.Checkbox('Tab 3##2', checkbox)
            imgui.EndTabItem()
        end
        imgui.EndTabBar()
    end
    imgui.End()
end)

куда мне вставить имгуи параметр что бы был другой интерфейс имгуи тожедам ниже

код:
function apply_custom_style()
    imgui.SwitchContext()
    local style = imgui.GetStyle()
    local colors = style.Colors
    local clr = imgui.Col
    local ImVec4 = imgui.ImVec4

    style.WindowRounding = 2.0
    style.WindowTitleAlign = imgui.ImVec2(0.5, 0.84)
    style.ChildWindowRounding = 2.0
    style.FrameRounding = 2.0
    style.ItemSpacing = imgui.ImVec2(5.0, 4.0)
    style.ScrollbarSize = 13.0
    style.ScrollbarRounding = 0
    style.GrabMinSize = 8.0
    style.GrabRounding = 1.0

    colors[clr.FrameBg]                = ImVec4(0.16, 0.48, 0.42, 0.54)
    colors[clr.FrameBgHovered]         = ImVec4(0.26, 0.98, 0.85, 0.40)
    colors[clr.FrameBgActive]          = ImVec4(0.26, 0.98, 0.85, 0.67)
    colors[clr.TitleBg]                = ImVec4(0.04, 0.04, 0.04, 1.00)
    colors[clr.TitleBgActive]          = ImVec4(0.16, 0.48, 0.42, 1.00)
    colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51)
    colors[clr.CheckMark]              = ImVec4(0.26, 0.98, 0.85, 1.00)
    colors[clr.SliderGrab]             = ImVec4(0.24, 0.88, 0.77, 1.00)
    colors[clr.SliderGrabActive]       = ImVec4(0.26, 0.98, 0.85, 1.00)
    colors[clr.Button]                 = ImVec4(0.26, 0.98, 0.85, 0.40)
    colors[clr.ButtonHovered]          = ImVec4(0.26, 0.98, 0.85, 1.00)
    colors[clr.ButtonActive]           = ImVec4(0.06, 0.98, 0.82, 1.00)
    colors[clr.Header]                 = ImVec4(0.26, 0.98, 0.85, 0.31)
    colors[clr.HeaderHovered]          = ImVec4(0.26, 0.98, 0.85, 0.80)
    colors[clr.HeaderActive]           = ImVec4(0.26, 0.98, 0.85, 1.00)
    colors[clr.Separator]              = colors[clr.Border]
    colors[clr.SeparatorHovered]       = ImVec4(0.10, 0.75, 0.63, 0.78)
    colors[clr.SeparatorActive]        = ImVec4(0.10, 0.75, 0.63, 1.00)
    colors[clr.ResizeGrip]             = ImVec4(0.26, 0.98, 0.85, 0.25)
    colors[clr.ResizeGripHovered]      = ImVec4(0.26, 0.98, 0.85, 0.67)
    colors[clr.ResizeGripActive]       = ImVec4(0.26, 0.98, 0.85, 0.95)
    colors[clr.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00)
    colors[clr.PlotLinesHovered]       = ImVec4(1.00, 0.81, 0.35, 1.00)
    colors[clr.TextSelectedBg]         = ImVec4(0.26, 0.98, 0.85, 0.35)
    colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, 1.00)
    colors[clr.TextDisabled]           = ImVec4(0.50, 0.50, 0.50, 1.00)
    colors[clr.WindowBg]               = ImVec4(0.06, 0.06, 0.06, 0.94)
    colors[clr.ChildWindowBg]          = ImVec4(1.00, 1.00, 1.00, 0.00)
    colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94)
    colors[clr.ComboBg]                = colors[clr.PopupBg]
    colors[clr.Border]                 = ImVec4(0.43, 0.43, 0.50, 0.50)
    colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
    colors[clr.MenuBarBg]              = ImVec4(0.14, 0.14, 0.14, 1.00)
    colors[clr.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
    colors[clr.ScrollbarGrab]          = ImVec4(0.31, 0.31, 0.31, 1.00)
    colors[clr.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
    colors[clr.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
    colors[clr.CloseButton]            = ImVec4(0.41, 0.41, 0.41, 0.50)
    colors[clr.CloseButtonHovered]     = ImVec4(0.98, 0.39, 0.36, 1.00)
    colors[clr.CloseButtonActive]      = ImVec4(0.98, 0.39, 0.36, 1.00)
    colors[clr.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
    colors[clr.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
    colors[clr.ModalWindowDarkening]   = ImVec4(0.80, 0.80, 0.80, 0.35)
end
lTI4IHy.png
 
Последнее редактирование:

Ononimus

Потрачен
60
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Lua:
-- в main
style() -- в скобки пиши какой тебе надо, от 0 до 6

-- этот кусок можешь в конец скрипта вставить, не в другую функцию!
function style(id)
    imgui.SwitchContext()
    local style = imgui.GetStyle()
    local colors = style.Colors
    local clr = imgui.Col
    local ImVec4 = imgui.ImVec4

    style.WindowRounding = 2.0
    style.WindowTitleAlign = imgui.ImVec2(0.5, 0.5)
    style.ChildWindowRounding = 2.0
    style.FrameRounding = 2.0
    style.ItemSpacing = imgui.ImVec2(5.0, 4.0)
    style.ScrollbarSize = 13.0
    style.ScrollbarRounding = 0
    style.GrabMinSize = 8.0
    style.GrabRounding = 1.0
    if id == 0 then -- dark - orange
        colors[clr.Text] = ImVec4(0.80, 0.80, 0.83, 1.00)
        colors[clr.TextDisabled] = ImVec4(0.24, 0.23, 0.29, 1.00)
        colors[clr.WindowBg] = ImVec4(0.06, 0.05, 0.07, 1.00)
        colors[clr.ChildWindowBg] = ImVec4(0.07, 0.07, 0.09, 1.00)
        colors[clr.PopupBg] = ImVec4(0.07, 0.07, 0.09, 1.00)
        colors[clr.Border] = ImVec4(0.80, 0.80, 0.83, 0.88)
        colors[clr.BorderShadow] = ImVec4(0.92, 0.91, 0.88, 0.00)
        colors[clr.FrameBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
        colors[clr.FrameBgHovered] = ImVec4(0.24, 0.23, 0.29, 1.00)
        colors[clr.FrameBgActive] = ImVec4(0.56, 0.56, 0.58, 1.00)
        colors[clr.TitleBg] = ImVec4(0.76, 0.31, 0.00, 1.00)
        colors[clr.TitleBgCollapsed] = ImVec4(1.00, 0.98, 0.95, 0.75)
        colors[clr.TitleBgActive] = ImVec4(0.80, 0.33, 0.00, 1.00)
        colors[clr.MenuBarBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
        colors[clr.ScrollbarBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
        colors[clr.ScrollbarGrab] = ImVec4(0.80, 0.80, 0.83, 0.31)
        colors[clr.ScrollbarGrabHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
        colors[clr.ScrollbarGrabActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
        colors[clr.ComboBg] = ImVec4(0.19, 0.18, 0.21, 1.00)
        colors[clr.CheckMark] = ImVec4(1.00, 0.42, 0.00, 0.53)
        colors[clr.SliderGrab] = ImVec4(1.00, 0.42, 0.00, 0.53)
        colors[clr.SliderGrabActive] = ImVec4(1.00, 0.42, 0.00, 1.00)
        colors[clr.Button] = ImVec4(0.10, 0.09, 0.12, 1.00)
        colors[clr.ButtonHovered] = ImVec4(0.24, 0.23, 0.29, 1.00)
        colors[clr.ButtonActive] = ImVec4(0.56, 0.56, 0.58, 1.00)
        colors[clr.Header] = ImVec4(0.10, 0.09, 0.12, 1.00)
        colors[clr.HeaderHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
        colors[clr.HeaderActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
        colors[clr.ResizeGrip] = ImVec4(0.00, 0.00, 0.00, 0.00)
        colors[clr.ResizeGripHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
        colors[clr.ResizeGripActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
        colors[clr.CloseButton] = ImVec4(0.40, 0.39, 0.38, 0.16)
        colors[clr.CloseButtonHovered] = ImVec4(0.40, 0.39, 0.38, 0.39)
        colors[clr.CloseButtonActive] = ImVec4(0.40, 0.39, 0.38, 1.00)
        colors[clr.PlotLines] = ImVec4(0.40, 0.39, 0.38, 0.63)
        colors[clr.PlotLinesHovered] = ImVec4(0.25, 1.00, 0.00, 1.00)
        colors[clr.PlotHistogram] = ImVec4(0.40, 0.39, 0.38, 0.63)
        colors[clr.PlotHistogramHovered] = ImVec4(0.25, 1.00, 0.00, 1.00)
        colors[clr.TextSelectedBg] = ImVec4(0.25, 1.00, 0.00, 0.43)
        colors[clr.ModalWindowDarkening] = ImVec4(1.00, 0.98, 0.95, 0.73)

    elseif id == 1 then -- blue
        colors[clr.FrameBg]                 = ImVec4(0.16, 0.29, 0.48, 0.54)
        colors[clr.FrameBgHovered]          = ImVec4(0.26, 0.59, 0.98, 0.40)
        colors[clr.FrameBgActive]           = ImVec4(0.26, 0.59, 0.98, 0.67)
        colors[clr.TitleBg]                 = ImVec4(0.04, 0.04, 0.04, 1.00)
        colors[clr.TitleBgActive]           = ImVec4(0.16, 0.29, 0.48, 1.00)
        colors[clr.TitleBgCollapsed]        = ImVec4(0.00, 0.00, 0.00, 0.51)
        colors[clr.CheckMark]               = ImVec4(0.26, 0.59, 0.98, 1.00)
        colors[clr.SliderGrab]              = ImVec4(0.24, 0.52, 0.88, 1.00)
        colors[clr.SliderGrabActive]        = ImVec4(0.26, 0.59, 0.98, 1.00)
        colors[clr.Button]                  = ImVec4(0.26, 0.59, 0.98, 0.40)
        colors[clr.ButtonHovered]           = ImVec4(0.26, 0.59, 0.98, 1.00)
        colors[clr.ButtonActive]            = ImVec4(0.06, 0.53, 0.98, 1.00)
        colors[clr.Header]                  = ImVec4(0.26, 0.59, 0.98, 0.31)
        colors[clr.HeaderHovered]           = ImVec4(0.26, 0.59, 0.98, 0.80)
        colors[clr.HeaderActive]            = ImVec4(0.26, 0.59, 0.98, 1.00)
        colors[clr.Separator]               = colors[clr.Border]
        colors[clr.SeparatorHovered]        = ImVec4(0.26, 0.59, 0.98, 0.78)
        colors[clr.SeparatorActive]         = ImVec4(0.26, 0.59, 0.98, 1.00)
        colors[clr.ResizeGrip]              = ImVec4(0.26, 0.59, 0.98, 0.25)
        colors[clr.ResizeGripHovered]       = ImVec4(0.26, 0.59, 0.98, 0.67)
        colors[clr.ResizeGripActive]        = ImVec4(0.26, 0.59, 0.98, 0.95)
        colors[clr.TextSelectedBg]          = ImVec4(0.26, 0.59, 0.98, 0.35)
        colors[clr.Text]                    = ImVec4(1.00, 1.00, 1.00, 1.00)
        colors[clr.TextDisabled]            = ImVec4(0.50, 0.50, 0.50, 1.00)
        colors[clr.WindowBg]                = ImVec4(0.06, 0.06, 0.06, 0.94)
        colors[clr.ChildWindowBg]           = ImVec4(1.00, 1.00, 1.00, 0.00)
        colors[clr.PopupBg]                 = ImVec4(0.08, 0.08, 0.08, 0.94)
        colors[clr.ComboBg]                 = colors[clr.PopupBg]
        colors[clr.Border]                  = ImVec4(0.43, 0.43, 0.50, 0.50)
        colors[clr.BorderShadow]            = ImVec4(0.00, 0.00, 0.00, 0.00)
        colors[clr.MenuBarBg]               = ImVec4(0.14, 0.14, 0.14, 1.00)
        colors[clr.ScrollbarBg]             = ImVec4(0.02, 0.02, 0.02, 0.53)
        colors[clr.ScrollbarGrab]           = ImVec4(0.31, 0.31, 0.31, 1.00)
        colors[clr.ScrollbarGrabHovered]    = ImVec4(0.41, 0.41, 0.41, 1.00)
        colors[clr.ScrollbarGrabActive]     = ImVec4(0.51, 0.51, 0.51, 1.00)
        colors[clr.CloseButton]             = ImVec4(0.41, 0.41, 0.41, 0.50)
        colors[clr.CloseButtonHovered]      = ImVec4(0.98, 0.39, 0.36, 1.00)
        colors[clr.CloseButtonActive]       = ImVec4(0.98, 0.39, 0.36, 1.00)
        colors[clr.PlotLines]               = ImVec4(0.61, 0.61, 0.61, 1.00)
        colors[clr.PlotLinesHovered]        = ImVec4(1.00, 0.43, 0.35, 1.00)
        colors[clr.PlotHistogram]           = ImVec4(0.90, 0.70, 0.00, 1.00)
        colors[clr.PlotHistogramHovered]    = ImVec4(1.00, 0.60, 0.00, 1.00)
        colors[clr.ModalWindowDarkening]    = ImVec4(0.80, 0.80, 0.80, 0.35)
    elseif id == 2 then -- dark
        colors[clr.Text]                    = ImVec4(0.80, 0.80, 0.83, 1.00)
        colors[clr.TextDisabled]            = ImVec4(0.24, 0.23, 0.29, 1.00)
        colors[clr.WindowBg]                = ImVec4(0.06, 0.05, 0.07, 1.00)
        colors[clr.ChildWindowBg]           = ImVec4(0.07, 0.07, 0.09, 1.00)
        colors[clr.PopupBg]                 = ImVec4(0.07, 0.07, 0.09, 1.00)
        colors[clr.Border]                  = ImVec4(0.43, 0.43, 0.50, 0.50)
        colors[clr.BorderShadow]            = ImVec4(0.92, 0.91, 0.88, 0.00)
        colors[clr.FrameBg]                 = ImVec4(0.10, 0.09, 0.12, 1.00)
        colors[clr.FrameBgHovered]          = ImVec4(0.24, 0.23, 0.29, 1.00)
        colors[clr.FrameBgActive]           = ImVec4(0.56, 0.56, 0.58, 1.00)
        colors[clr.TitleBg]                 = ImVec4(0.10, 0.09, 0.12, 1.00)
        colors[clr.TitleBgCollapsed]        = ImVec4(1.00, 0.98, 0.95, 0.75)
        colors[clr.TitleBgActive]           = ImVec4(0.07, 0.07, 0.09, 1.00)
        colors[clr.MenuBarBg]               = ImVec4(0.10, 0.09, 0.12, 1.00)
        colors[clr.ScrollbarBg]             = ImVec4(0.10, 0.09, 0.12, 1.00)
        colors[clr.ScrollbarGrab]           = ImVec4(0.80, 0.80, 0.83, 0.31)
        colors[clr.ScrollbarGrabHovered]    = ImVec4(0.56, 0.56, 0.58, 1.00)
        colors[clr.ScrollbarGrabActive]     = ImVec4(0.06, 0.05, 0.07, 1.00)
        colors[clr.ComboBg]                 = ImVec4(0.19, 0.18, 0.21, 1.00)
        colors[clr.CheckMark]               = ImVec4(0.80, 0.80, 0.83, 0.31)
        colors[clr.SliderGrab]              = ImVec4(0.80, 0.80, 0.83, 0.31)
        colors[clr.SliderGrabActive]        = ImVec4(0.06, 0.05, 0.07, 1.00)
        colors[clr.Button]                  = ImVec4(0.10, 0.09, 0.12, 1.00)
        colors[clr.ButtonHovered]           = ImVec4(0.24, 0.23, 0.29, 1.00)
        colors[clr.ButtonActive]            = ImVec4(0.56, 0.56, 0.58, 1.00)
        colors[clr.Header]                  = ImVec4(0.10, 0.09, 0.12, 1.00)
        colors[clr.HeaderHovered]           = ImVec4(0.56, 0.56, 0.58, 1.00)
        colors[clr.HeaderActive]            = ImVec4(0.06, 0.05, 0.07, 1.00)
        colors[clr.ResizeGrip]              = ImVec4(0.00, 0.00, 0.00, 0.00)
        colors[clr.ResizeGripHovered]       = ImVec4(0.56, 0.56, 0.58, 1.00)
        colors[clr.ResizeGripActive]        = ImVec4(0.06, 0.05, 0.07, 1.00)
        colors[clr.CloseButton]             = ImVec4(0.40, 0.39, 0.38, 0.16)
        colors[clr.CloseButtonHovered]      = ImVec4(0.40, 0.39, 0.38, 0.39)
        colors[clr.CloseButtonActive]       = ImVec4(0.40, 0.39, 0.38, 1.00)
        colors[clr.PlotLines]               = ImVec4(0.40, 0.39, 0.38, 0.63)
        colors[clr.PlotLinesHovered]        = ImVec4(0.25, 1.00, 0.00, 1.00)
        colors[clr.PlotHistogram]           = ImVec4(0.40, 0.39, 0.38, 0.63)
        colors[clr.PlotHistogramHovered]    = ImVec4(0.25, 1.00, 0.00, 1.00)
        colors[clr.TextSelectedBg]          = ImVec4(0.25, 1.00, 0.00, 0.43)
        colors[clr.ModalWindowDarkening]    = ImVec4(1.00, 0.98, 0.95, 0.73)
    elseif id == 3 then -- cherry
        colors[clr.Text]                    = ImVec4(0.860, 0.930, 0.890, 0.78)
        colors[clr.TextDisabled]            = ImVec4(0.860, 0.930, 0.890, 0.28)
        colors[clr.WindowBg]                = ImVec4(0.13, 0.14, 0.17, 1.00)
        colors[clr.ChildWindowBg]           = ImVec4(0.200, 0.220, 0.270, 0.58)
        colors[clr.PopupBg]                 = ImVec4(0.200, 0.220, 0.270, 0.9)
        colors[clr.Border]                  = ImVec4(0.43, 0.43, 0.50, 0.50)
        colors[clr.BorderShadow]            = ImVec4(0.00, 0.00, 0.00, 0.00)
        colors[clr.FrameBg]                 = ImVec4(0.200, 0.220, 0.270, 1.00)
        colors[clr.FrameBgHovered]          = ImVec4(0.455, 0.198, 0.301, 0.78)
        colors[clr.FrameBgActive]           = ImVec4(0.455, 0.198, 0.301, 1.00)
        colors[clr.TitleBg]                 = ImVec4(0.232, 0.201, 0.271, 1.00)
        colors[clr.TitleBgActive]           = ImVec4(0.502, 0.075, 0.256, 1.00)
        colors[clr.TitleBgCollapsed]        = ImVec4(0.200, 0.220, 0.270, 0.75)
        colors[clr.MenuBarBg]               = ImVec4(0.200, 0.220, 0.270, 0.47)
        colors[clr.ScrollbarBg]             = ImVec4(0.200, 0.220, 0.270, 1.00)
        colors[clr.ScrollbarGrab]           = ImVec4(0.09, 0.15, 0.1, 1.00)
        colors[clr.ScrollbarGrabHovered]    = ImVec4(0.455, 0.198, 0.301, 0.78)
        colors[clr.ScrollbarGrabActive]     = ImVec4(0.455, 0.198, 0.301, 1.00)
        colors[clr.CheckMark]               = ImVec4(0.71, 0.22, 0.27, 1.00)
        colors[clr.SliderGrab]              = ImVec4(0.47, 0.77, 0.83, 0.14)
        colors[clr.SliderGrabActive]        = ImVec4(0.71, 0.22, 0.27, 1.00)
        colors[clr.Button]                  = ImVec4(0.47, 0.77, 0.83, 0.14)
        colors[clr.ButtonHovered]           = ImVec4(0.455, 0.198, 0.301, 0.86)
        colors[clr.ButtonActive]            = ImVec4(0.455, 0.198, 0.301, 1.00)
        colors[clr.Header]                  = ImVec4(0.455, 0.198, 0.301, 0.76)
        colors[clr.HeaderHovered]           = ImVec4(0.455, 0.198, 0.301, 0.86)
        colors[clr.HeaderActive]            = ImVec4(0.502, 0.075, 0.256, 1.00)
        colors[clr.ResizeGrip]              = ImVec4(0.47, 0.77, 0.83, 0.04)
        colors[clr.ResizeGripHovered]       = ImVec4(0.455, 0.198, 0.301, 0.78)
        colors[clr.ResizeGripActive]        = ImVec4(0.455, 0.198, 0.301, 1.00)
        colors[clr.PlotLines]               = ImVec4(0.860, 0.930, 0.890, 0.63)
        colors[clr.PlotLinesHovered]        = ImVec4(0.455, 0.198, 0.301, 1.00)
        colors[clr.PlotHistogram]           = ImVec4(0.860, 0.930, 0.890, 0.63)
        colors[clr.PlotHistogramHovered]    = ImVec4(0.455, 0.198, 0.301, 1.00)
        colors[clr.TextSelectedBg]          = ImVec4(0.455, 0.198, 0.301, 0.43)
        colors[clr.ModalWindowDarkening]    = ImVec4(0.200, 0.220, 0.270, 0.73)
    elseif id == 4 then -- dark green
        colors[clr.Text]                   = ImVec4(0.90, 0.90, 0.90, 1.00)
        colors[clr.TextDisabled]           = ImVec4(0.60, 0.60, 0.60, 1.00)
        colors[clr.WindowBg]               = ImVec4(0.08, 0.08, 0.08, 1.00)
        colors[clr.ChildWindowBg]          = ImVec4(0.10, 0.10, 0.10, 1.00)
        colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 1.00)
        colors[clr.Border]                 = ImVec4(0.70, 0.70, 0.70, 0.40)
        colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
        colors[clr.FrameBg]                = ImVec4(0.15, 0.15, 0.15, 1.00)
        colors[clr.FrameBgHovered]         = ImVec4(0.19, 0.19, 0.19, 0.71)
        colors[clr.FrameBgActive]          = ImVec4(0.34, 0.34, 0.34, 0.79)
        colors[clr.TitleBg]                = ImVec4(0.00, 0.69, 0.33, 0.80)
        colors[clr.TitleBgActive]          = ImVec4(0.00, 0.74, 0.36, 1.00)
        colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.69, 0.33, 0.50)
        colors[clr.MenuBarBg]              = ImVec4(0.00, 0.80, 0.38, 1.00)
        colors[clr.ScrollbarBg]            = ImVec4(0.16, 0.16, 0.16, 1.00)
        colors[clr.ScrollbarGrab]          = ImVec4(0.00, 0.69, 0.33, 1.00)
        colors[clr.ScrollbarGrabHovered]   = ImVec4(0.00, 0.82, 0.39, 1.00)
        colors[clr.ScrollbarGrabActive]    = ImVec4(0.00, 1.00, 0.48, 1.00)
        colors[clr.ComboBg]                = ImVec4(0.20, 0.20, 0.20, 0.99)
        colors[clr.CheckMark]              = ImVec4(0.00, 0.69, 0.33, 1.00)
        colors[clr.SliderGrab]             = ImVec4(0.00, 0.69, 0.33, 1.00)
        colors[clr.SliderGrabActive]       = ImVec4(0.00, 0.77, 0.37, 1.00)
        colors[clr.Button]                 = ImVec4(0.00, 0.69, 0.33, 1.00)
        colors[clr.ButtonHovered]          = ImVec4(0.00, 0.82, 0.39, 1.00)
        colors[clr.ButtonActive]           = ImVec4(0.00, 0.87, 0.42, 1.00)
        colors[clr.Header]                 = ImVec4(0.00, 0.69, 0.33, 1.00)
        colors[clr.HeaderHovered]          = ImVec4(0.00, 0.76, 0.37, 0.57)
        colors[clr.HeaderActive]           = ImVec4(0.00, 0.88, 0.42, 0.89)
        colors[clr.Separator]              = ImVec4(1.00, 1.00, 1.00, 0.40)
        colors[clr.SeparatorHovered]       = ImVec4(1.00, 1.00, 1.00, 0.60)
        colors[clr.SeparatorActive]        = ImVec4(1.00, 1.00, 1.00, 0.80)
        colors[clr.ResizeGrip]             = ImVec4(0.00, 0.69, 0.33, 1.00)
        colors[clr.ResizeGripHovered]      = ImVec4(0.00, 0.76, 0.37, 1.00)
        colors[clr.ResizeGripActive]       = ImVec4(0.00, 0.86, 0.41, 1.00)
        colors[clr.CloseButton]            = ImVec4(0.00, 0.82, 0.39, 1.00)
        colors[clr.CloseButtonHovered]     = ImVec4(0.00, 0.88, 0.42, 1.00)
        colors[clr.CloseButtonActive]      = ImVec4(0.00, 1.00, 0.48, 1.00)
        colors[clr.PlotLines]              = ImVec4(0.00, 0.69, 0.33, 1.00)
        colors[clr.PlotLinesHovered]       = ImVec4(0.00, 0.74, 0.36, 1.00)
        colors[clr.PlotHistogram]          = ImVec4(0.00, 0.69, 0.33, 1.00)
        colors[clr.PlotHistogramHovered]   = ImVec4(0.00, 0.80, 0.38, 1.00)
        colors[clr.TextSelectedBg]         = ImVec4(0.00, 0.69, 0.33, 0.72)
        colors[clr.ModalWindowDarkening]   = ImVec4(0.17, 0.17, 0.17, 0.48)
    elseif id == 5 then --red
        colors[clr.FrameBg]                = ImVec4(0.48, 0.16, 0.16, 0.54)
        colors[clr.FrameBgHovered]         = ImVec4(0.98, 0.26, 0.26, 0.40)
        colors[clr.FrameBgActive]          = ImVec4(0.98, 0.26, 0.26, 0.67)
        colors[clr.TitleBg]                = ImVec4(0.04, 0.04, 0.04, 1.00)
        colors[clr.TitleBgActive]          = ImVec4(0.48, 0.16, 0.16, 1.00)
        colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51)
        colors[clr.CheckMark]              = ImVec4(0.98, 0.26, 0.26, 1.00)
        colors[clr.SliderGrab]             = ImVec4(0.88, 0.26, 0.24, 1.00)
        colors[clr.SliderGrabActive]       = ImVec4(0.98, 0.26, 0.26, 1.00)
        colors[clr.Button]                 = ImVec4(0.98, 0.26, 0.26, 0.40)
        colors[clr.ButtonHovered]          = ImVec4(0.98, 0.26, 0.26, 1.00)
        colors[clr.ButtonActive]           = ImVec4(0.98, 0.06, 0.06, 1.00)
        colors[clr.Header]                 = ImVec4(0.98, 0.26, 0.26, 0.31)
        colors[clr.HeaderHovered]          = ImVec4(0.98, 0.26, 0.26, 0.80)
        colors[clr.HeaderActive]           = ImVec4(0.98, 0.26, 0.26, 1.00)
        colors[clr.Separator]              = colors[clr.Border]
        colors[clr.SeparatorHovered]       = ImVec4(0.75, 0.10, 0.10, 0.78)
        colors[clr.SeparatorActive]        = ImVec4(0.75, 0.10, 0.10, 1.00)
        colors[clr.ResizeGrip]             = ImVec4(0.98, 0.26, 0.26, 0.25)
        colors[clr.ResizeGripHovered]      = ImVec4(0.98, 0.26, 0.26, 0.67)
        colors[clr.ResizeGripActive]       = ImVec4(0.98, 0.26, 0.26, 0.95)
        colors[clr.TextSelectedBg]         = ImVec4(0.98, 0.26, 0.26, 0.35)
        colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, 1.00)
        colors[clr.TextDisabled]           = ImVec4(0.50, 0.50, 0.50, 1.00)
        colors[clr.WindowBg]               = ImVec4(0.06, 0.06, 0.06, 0.94)
        colors[clr.ChildWindowBg]          = ImVec4(1.00, 1.00, 1.00, 0.00)
        colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94)
        colors[clr.ComboBg]                = colors[clr.PopupBg]
        colors[clr.Border]                 = ImVec4(0.43, 0.43, 0.50, 0.50)
        colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
        colors[clr.MenuBarBg]              = ImVec4(0.14, 0.14, 0.14, 1.00)
        colors[clr.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
        colors[clr.ScrollbarGrab]          = ImVec4(0.31, 0.31, 0.31, 1.00)
        colors[clr.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
        colors[clr.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
        colors[clr.CloseButton]            = ImVec4(0.41, 0.41, 0.41, 0.50)
        colors[clr.CloseButtonHovered]     = ImVec4(0.98, 0.39, 0.36, 1.00)
        colors[clr.CloseButtonActive]      = ImVec4(0.98, 0.39, 0.36, 1.00)
        colors[clr.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00)
        colors[clr.PlotLinesHovered]       = ImVec4(1.00, 0.43, 0.35, 1.00)
        colors[clr.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
        colors[clr.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
        colors[clr.ModalWindowDarkening]   = ImVec4(0.80, 0.80, 0.80, 0.35)
    elseif id == 6 then --violet
        colors[clr.WindowBg]              = ImVec4(0.14, 0.12, 0.16, 1.00);
        colors[clr.ChildWindowBg]         = ImVec4(0.30, 0.20, 0.39, 0.00);
        colors[clr.PopupBg]               = ImVec4(0.05, 0.05, 0.10, 0.90);
        colors[clr.Border]                = ImVec4(0.89, 0.85, 0.92, 0.30);
        colors[clr.BorderShadow]          = ImVec4(0.00, 0.00, 0.00, 0.00);
        colors[clr.FrameBg]               = ImVec4(0.30, 0.20, 0.39, 1.00);
        colors[clr.FrameBgHovered]        = ImVec4(0.41, 0.19, 0.63, 0.68);
        colors[clr.FrameBgActive]         = ImVec4(0.41, 0.19, 0.63, 1.00);
        colors[clr.TitleBg]               = ImVec4(0.41, 0.19, 0.63, 0.45);
        colors[clr.TitleBgCollapsed]      = ImVec4(0.41, 0.19, 0.63, 0.35);
        colors[clr.TitleBgActive]         = ImVec4(0.41, 0.19, 0.63, 0.78);
        colors[clr.MenuBarBg]             = ImVec4(0.30, 0.20, 0.39, 0.57);
        colors[clr.ScrollbarBg]           = ImVec4(0.30, 0.20, 0.39, 1.00);
        colors[clr.ScrollbarGrab]         = ImVec4(0.41, 0.19, 0.63, 0.31);
        colors[clr.ScrollbarGrabHovered]  = ImVec4(0.41, 0.19, 0.63, 0.78);
        colors[clr.ScrollbarGrabActive]   = ImVec4(0.41, 0.19, 0.63, 1.00);
        colors[clr.ComboBg]               = ImVec4(0.30, 0.20, 0.39, 1.00);
        colors[clr.CheckMark]             = ImVec4(0.56, 0.61, 1.00, 1.00);
        colors[clr.SliderGrab]            = ImVec4(0.41, 0.19, 0.63, 0.24);
        colors[clr.SliderGrabActive]      = ImVec4(0.41, 0.19, 0.63, 1.00);
        colors[clr.Button]                = ImVec4(0.41, 0.19, 0.63, 0.44);
        colors[clr.ButtonHovered]         = ImVec4(0.41, 0.19, 0.63, 0.86);
        colors[clr.ButtonActive]          = ImVec4(0.64, 0.33, 0.94, 1.00);
        colors[clr.Header]                = ImVec4(0.41, 0.19, 0.63, 0.76);
        colors[clr.HeaderHovered]         = ImVec4(0.41, 0.19, 0.63, 0.86);
        colors[clr.HeaderActive]          = ImVec4(0.41, 0.19, 0.63, 1.00);
        colors[clr.ResizeGrip]            = ImVec4(0.41, 0.19, 0.63, 0.20);
        colors[clr.ResizeGripHovered]     = ImVec4(0.41, 0.19, 0.63, 0.78);
        colors[clr.ResizeGripActive]      = ImVec4(0.41, 0.19, 0.63, 1.00);
        colors[clr.CloseButton]           = ImVec4(1.00, 1.00, 1.00, 0.75);
        colors[clr.CloseButtonHovered]    = ImVec4(0.88, 0.74, 1.00, 0.59);
        colors[clr.CloseButtonActive]     = ImVec4(0.88, 0.85, 0.92, 1.00);
        colors[clr.PlotLines]             = ImVec4(0.89, 0.85, 0.92, 0.63);
        colors[clr.PlotLinesHovered]      = ImVec4(0.41, 0.19, 0.63, 1.00);
        colors[clr.PlotHistogram]         = ImVec4(0.89, 0.85, 0.92, 0.63);
        colors[clr.PlotHistogramHovered]  = ImVec4(0.41, 0.19, 0.63, 1.00);
        colors[clr.TextSelectedBg]        = ImVec4(0.41, 0.19, 0.63, 0.43);
        colors[clr.ModalWindowDarkening]  = ImVec4(0.20, 0.20, 0.20, 0.35);
    end
end
лично мне нравится зеленый, то есть 4 стиль

как то можно записывать корды чего либо в конфиг? например ищу я по штату определенные объекты, можно получать их корды и как записывать в конфиг?
ТЫ ПРОСТО ЛУЧШИЙ

Lua:
-- в main
style() -- в скобки пиши какой тебе надо, от 0 до 6

-- этот кусок можешь в конец скрипта вставить, не в другую функцию!
function style(id)
    imgui.SwitchContext()
    local style = imgui.GetStyle()
    local colors = style.Colors
    local clr = imgui.Col
    local ImVec4 = imgui.ImVec4

    style.WindowRounding = 2.0
    style.WindowTitleAlign = imgui.ImVec2(0.5, 0.5)
    style.ChildWindowRounding = 2.0
    style.FrameRounding = 2.0
    style.ItemSpacing = imgui.ImVec2(5.0, 4.0)
    style.ScrollbarSize = 13.0
    style.ScrollbarRounding = 0
    style.GrabMinSize = 8.0
    style.GrabRounding = 1.0
    if id == 0 then -- dark - orange
        colors[clr.Text] = ImVec4(0.80, 0.80, 0.83, 1.00)
        colors[clr.TextDisabled] = ImVec4(0.24, 0.23, 0.29, 1.00)
        colors[clr.WindowBg] = ImVec4(0.06, 0.05, 0.07, 1.00)
        colors[clr.ChildWindowBg] = ImVec4(0.07, 0.07, 0.09, 1.00)
        colors[clr.PopupBg] = ImVec4(0.07, 0.07, 0.09, 1.00)
        colors[clr.Border] = ImVec4(0.80, 0.80, 0.83, 0.88)
        colors[clr.BorderShadow] = ImVec4(0.92, 0.91, 0.88, 0.00)
        colors[clr.FrameBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
        colors[clr.FrameBgHovered] = ImVec4(0.24, 0.23, 0.29, 1.00)
        colors[clr.FrameBgActive] = ImVec4(0.56, 0.56, 0.58, 1.00)
        colors[clr.TitleBg] = ImVec4(0.76, 0.31, 0.00, 1.00)
        colors[clr.TitleBgCollapsed] = ImVec4(1.00, 0.98, 0.95, 0.75)
        colors[clr.TitleBgActive] = ImVec4(0.80, 0.33, 0.00, 1.00)
        colors[clr.MenuBarBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
        colors[clr.ScrollbarBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
        colors[clr.ScrollbarGrab] = ImVec4(0.80, 0.80, 0.83, 0.31)
        colors[clr.ScrollbarGrabHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
        colors[clr.ScrollbarGrabActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
        colors[clr.ComboBg] = ImVec4(0.19, 0.18, 0.21, 1.00)
        colors[clr.CheckMark] = ImVec4(1.00, 0.42, 0.00, 0.53)
        colors[clr.SliderGrab] = ImVec4(1.00, 0.42, 0.00, 0.53)
        colors[clr.SliderGrabActive] = ImVec4(1.00, 0.42, 0.00, 1.00)
        colors[clr.Button] = ImVec4(0.10, 0.09, 0.12, 1.00)
        colors[clr.ButtonHovered] = ImVec4(0.24, 0.23, 0.29, 1.00)
        colors[clr.ButtonActive] = ImVec4(0.56, 0.56, 0.58, 1.00)
        colors[clr.Header] = ImVec4(0.10, 0.09, 0.12, 1.00)
        colors[clr.HeaderHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
        colors[clr.HeaderActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
        colors[clr.ResizeGrip] = ImVec4(0.00, 0.00, 0.00, 0.00)
        colors[clr.ResizeGripHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
        colors[clr.ResizeGripActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
        colors[clr.CloseButton] = ImVec4(0.40, 0.39, 0.38, 0.16)
        colors[clr.CloseButtonHovered] = ImVec4(0.40, 0.39, 0.38, 0.39)
        colors[clr.CloseButtonActive] = ImVec4(0.40, 0.39, 0.38, 1.00)
        colors[clr.PlotLines] = ImVec4(0.40, 0.39, 0.38, 0.63)
        colors[clr.PlotLinesHovered] = ImVec4(0.25, 1.00, 0.00, 1.00)
        colors[clr.PlotHistogram] = ImVec4(0.40, 0.39, 0.38, 0.63)
        colors[clr.PlotHistogramHovered] = ImVec4(0.25, 1.00, 0.00, 1.00)
        colors[clr.TextSelectedBg] = ImVec4(0.25, 1.00, 0.00, 0.43)
        colors[clr.ModalWindowDarkening] = ImVec4(1.00, 0.98, 0.95, 0.73)

    elseif id == 1 then -- blue
        colors[clr.FrameBg]                 = ImVec4(0.16, 0.29, 0.48, 0.54)
        colors[clr.FrameBgHovered]          = ImVec4(0.26, 0.59, 0.98, 0.40)
        colors[clr.FrameBgActive]           = ImVec4(0.26, 0.59, 0.98, 0.67)
        colors[clr.TitleBg]                 = ImVec4(0.04, 0.04, 0.04, 1.00)
        colors[clr.TitleBgActive]           = ImVec4(0.16, 0.29, 0.48, 1.00)
        colors[clr.TitleBgCollapsed]        = ImVec4(0.00, 0.00, 0.00, 0.51)
        colors[clr.CheckMark]               = ImVec4(0.26, 0.59, 0.98, 1.00)
        colors[clr.SliderGrab]              = ImVec4(0.24, 0.52, 0.88, 1.00)
        colors[clr.SliderGrabActive]        = ImVec4(0.26, 0.59, 0.98, 1.00)
        colors[clr.Button]                  = ImVec4(0.26, 0.59, 0.98, 0.40)
        colors[clr.ButtonHovered]           = ImVec4(0.26, 0.59, 0.98, 1.00)
        colors[clr.ButtonActive]            = ImVec4(0.06, 0.53, 0.98, 1.00)
        colors[clr.Header]                  = ImVec4(0.26, 0.59, 0.98, 0.31)
        colors[clr.HeaderHovered]           = ImVec4(0.26, 0.59, 0.98, 0.80)
        colors[clr.HeaderActive]            = ImVec4(0.26, 0.59, 0.98, 1.00)
        colors[clr.Separator]               = colors[clr.Border]
        colors[clr.SeparatorHovered]        = ImVec4(0.26, 0.59, 0.98, 0.78)
        colors[clr.SeparatorActive]         = ImVec4(0.26, 0.59, 0.98, 1.00)
        colors[clr.ResizeGrip]              = ImVec4(0.26, 0.59, 0.98, 0.25)
        colors[clr.ResizeGripHovered]       = ImVec4(0.26, 0.59, 0.98, 0.67)
        colors[clr.ResizeGripActive]        = ImVec4(0.26, 0.59, 0.98, 0.95)
        colors[clr.TextSelectedBg]          = ImVec4(0.26, 0.59, 0.98, 0.35)
        colors[clr.Text]                    = ImVec4(1.00, 1.00, 1.00, 1.00)
        colors[clr.TextDisabled]            = ImVec4(0.50, 0.50, 0.50, 1.00)
        colors[clr.WindowBg]                = ImVec4(0.06, 0.06, 0.06, 0.94)
        colors[clr.ChildWindowBg]           = ImVec4(1.00, 1.00, 1.00, 0.00)
        colors[clr.PopupBg]                 = ImVec4(0.08, 0.08, 0.08, 0.94)
        colors[clr.ComboBg]                 = colors[clr.PopupBg]
        colors[clr.Border]                  = ImVec4(0.43, 0.43, 0.50, 0.50)
        colors[clr.BorderShadow]            = ImVec4(0.00, 0.00, 0.00, 0.00)
        colors[clr.MenuBarBg]               = ImVec4(0.14, 0.14, 0.14, 1.00)
        colors[clr.ScrollbarBg]             = ImVec4(0.02, 0.02, 0.02, 0.53)
        colors[clr.ScrollbarGrab]           = ImVec4(0.31, 0.31, 0.31, 1.00)
        colors[clr.ScrollbarGrabHovered]    = ImVec4(0.41, 0.41, 0.41, 1.00)
        colors[clr.ScrollbarGrabActive]     = ImVec4(0.51, 0.51, 0.51, 1.00)
        colors[clr.CloseButton]             = ImVec4(0.41, 0.41, 0.41, 0.50)
        colors[clr.CloseButtonHovered]      = ImVec4(0.98, 0.39, 0.36, 1.00)
        colors[clr.CloseButtonActive]       = ImVec4(0.98, 0.39, 0.36, 1.00)
        colors[clr.PlotLines]               = ImVec4(0.61, 0.61, 0.61, 1.00)
        colors[clr.PlotLinesHovered]        = ImVec4(1.00, 0.43, 0.35, 1.00)
        colors[clr.PlotHistogram]           = ImVec4(0.90, 0.70, 0.00, 1.00)
        colors[clr.PlotHistogramHovered]    = ImVec4(1.00, 0.60, 0.00, 1.00)
        colors[clr.ModalWindowDarkening]    = ImVec4(0.80, 0.80, 0.80, 0.35)
    elseif id == 2 then -- dark
        colors[clr.Text]                    = ImVec4(0.80, 0.80, 0.83, 1.00)
        colors[clr.TextDisabled]            = ImVec4(0.24, 0.23, 0.29, 1.00)
        colors[clr.WindowBg]                = ImVec4(0.06, 0.05, 0.07, 1.00)
        colors[clr.ChildWindowBg]           = ImVec4(0.07, 0.07, 0.09, 1.00)
        colors[clr.PopupBg]                 = ImVec4(0.07, 0.07, 0.09, 1.00)
        colors[clr.Border]                  = ImVec4(0.43, 0.43, 0.50, 0.50)
        colors[clr.BorderShadow]            = ImVec4(0.92, 0.91, 0.88, 0.00)
        colors[clr.FrameBg]                 = ImVec4(0.10, 0.09, 0.12, 1.00)
        colors[clr.FrameBgHovered]          = ImVec4(0.24, 0.23, 0.29, 1.00)
        colors[clr.FrameBgActive]           = ImVec4(0.56, 0.56, 0.58, 1.00)
        colors[clr.TitleBg]                 = ImVec4(0.10, 0.09, 0.12, 1.00)
        colors[clr.TitleBgCollapsed]        = ImVec4(1.00, 0.98, 0.95, 0.75)
        colors[clr.TitleBgActive]           = ImVec4(0.07, 0.07, 0.09, 1.00)
        colors[clr.MenuBarBg]               = ImVec4(0.10, 0.09, 0.12, 1.00)
        colors[clr.ScrollbarBg]             = ImVec4(0.10, 0.09, 0.12, 1.00)
        colors[clr.ScrollbarGrab]           = ImVec4(0.80, 0.80, 0.83, 0.31)
        colors[clr.ScrollbarGrabHovered]    = ImVec4(0.56, 0.56, 0.58, 1.00)
        colors[clr.ScrollbarGrabActive]     = ImVec4(0.06, 0.05, 0.07, 1.00)
        colors[clr.ComboBg]                 = ImVec4(0.19, 0.18, 0.21, 1.00)
        colors[clr.CheckMark]               = ImVec4(0.80, 0.80, 0.83, 0.31)
        colors[clr.SliderGrab]              = ImVec4(0.80, 0.80, 0.83, 0.31)
        colors[clr.SliderGrabActive]        = ImVec4(0.06, 0.05, 0.07, 1.00)
        colors[clr.Button]                  = ImVec4(0.10, 0.09, 0.12, 1.00)
        colors[clr.ButtonHovered]           = ImVec4(0.24, 0.23, 0.29, 1.00)
        colors[clr.ButtonActive]            = ImVec4(0.56, 0.56, 0.58, 1.00)
        colors[clr.Header]                  = ImVec4(0.10, 0.09, 0.12, 1.00)
        colors[clr.HeaderHovered]           = ImVec4(0.56, 0.56, 0.58, 1.00)
        colors[clr.HeaderActive]            = ImVec4(0.06, 0.05, 0.07, 1.00)
        colors[clr.ResizeGrip]              = ImVec4(0.00, 0.00, 0.00, 0.00)
        colors[clr.ResizeGripHovered]       = ImVec4(0.56, 0.56, 0.58, 1.00)
        colors[clr.ResizeGripActive]        = ImVec4(0.06, 0.05, 0.07, 1.00)
        colors[clr.CloseButton]             = ImVec4(0.40, 0.39, 0.38, 0.16)
        colors[clr.CloseButtonHovered]      = ImVec4(0.40, 0.39, 0.38, 0.39)
        colors[clr.CloseButtonActive]       = ImVec4(0.40, 0.39, 0.38, 1.00)
        colors[clr.PlotLines]               = ImVec4(0.40, 0.39, 0.38, 0.63)
        colors[clr.PlotLinesHovered]        = ImVec4(0.25, 1.00, 0.00, 1.00)
        colors[clr.PlotHistogram]           = ImVec4(0.40, 0.39, 0.38, 0.63)
        colors[clr.PlotHistogramHovered]    = ImVec4(0.25, 1.00, 0.00, 1.00)
        colors[clr.TextSelectedBg]          = ImVec4(0.25, 1.00, 0.00, 0.43)
        colors[clr.ModalWindowDarkening]    = ImVec4(1.00, 0.98, 0.95, 0.73)
    elseif id == 3 then -- cherry
        colors[clr.Text]                    = ImVec4(0.860, 0.930, 0.890, 0.78)
        colors[clr.TextDisabled]            = ImVec4(0.860, 0.930, 0.890, 0.28)
        colors[clr.WindowBg]                = ImVec4(0.13, 0.14, 0.17, 1.00)
        colors[clr.ChildWindowBg]           = ImVec4(0.200, 0.220, 0.270, 0.58)
        colors[clr.PopupBg]                 = ImVec4(0.200, 0.220, 0.270, 0.9)
        colors[clr.Border]                  = ImVec4(0.43, 0.43, 0.50, 0.50)
        colors[clr.BorderShadow]            = ImVec4(0.00, 0.00, 0.00, 0.00)
        colors[clr.FrameBg]                 = ImVec4(0.200, 0.220, 0.270, 1.00)
        colors[clr.FrameBgHovered]          = ImVec4(0.455, 0.198, 0.301, 0.78)
        colors[clr.FrameBgActive]           = ImVec4(0.455, 0.198, 0.301, 1.00)
        colors[clr.TitleBg]                 = ImVec4(0.232, 0.201, 0.271, 1.00)
        colors[clr.TitleBgActive]           = ImVec4(0.502, 0.075, 0.256, 1.00)
        colors[clr.TitleBgCollapsed]        = ImVec4(0.200, 0.220, 0.270, 0.75)
        colors[clr.MenuBarBg]               = ImVec4(0.200, 0.220, 0.270, 0.47)
        colors[clr.ScrollbarBg]             = ImVec4(0.200, 0.220, 0.270, 1.00)
        colors[clr.ScrollbarGrab]           = ImVec4(0.09, 0.15, 0.1, 1.00)
        colors[clr.ScrollbarGrabHovered]    = ImVec4(0.455, 0.198, 0.301, 0.78)
        colors[clr.ScrollbarGrabActive]     = ImVec4(0.455, 0.198, 0.301, 1.00)
        colors[clr.CheckMark]               = ImVec4(0.71, 0.22, 0.27, 1.00)
        colors[clr.SliderGrab]              = ImVec4(0.47, 0.77, 0.83, 0.14)
        colors[clr.SliderGrabActive]        = ImVec4(0.71, 0.22, 0.27, 1.00)
        colors[clr.Button]                  = ImVec4(0.47, 0.77, 0.83, 0.14)
        colors[clr.ButtonHovered]           = ImVec4(0.455, 0.198, 0.301, 0.86)
        colors[clr.ButtonActive]            = ImVec4(0.455, 0.198, 0.301, 1.00)
        colors[clr.Header]                  = ImVec4(0.455, 0.198, 0.301, 0.76)
        colors[clr.HeaderHovered]           = ImVec4(0.455, 0.198, 0.301, 0.86)
        colors[clr.HeaderActive]            = ImVec4(0.502, 0.075, 0.256, 1.00)
        colors[clr.ResizeGrip]              = ImVec4(0.47, 0.77, 0.83, 0.04)
        colors[clr.ResizeGripHovered]       = ImVec4(0.455, 0.198, 0.301, 0.78)
        colors[clr.ResizeGripActive]        = ImVec4(0.455, 0.198, 0.301, 1.00)
        colors[clr.PlotLines]               = ImVec4(0.860, 0.930, 0.890, 0.63)
        colors[clr.PlotLinesHovered]        = ImVec4(0.455, 0.198, 0.301, 1.00)
        colors[clr.PlotHistogram]           = ImVec4(0.860, 0.930, 0.890, 0.63)
        colors[clr.PlotHistogramHovered]    = ImVec4(0.455, 0.198, 0.301, 1.00)
        colors[clr.TextSelectedBg]          = ImVec4(0.455, 0.198, 0.301, 0.43)
        colors[clr.ModalWindowDarkening]    = ImVec4(0.200, 0.220, 0.270, 0.73)
    elseif id == 4 then -- dark green
        colors[clr.Text]                   = ImVec4(0.90, 0.90, 0.90, 1.00)
        colors[clr.TextDisabled]           = ImVec4(0.60, 0.60, 0.60, 1.00)
        colors[clr.WindowBg]               = ImVec4(0.08, 0.08, 0.08, 1.00)
        colors[clr.ChildWindowBg]          = ImVec4(0.10, 0.10, 0.10, 1.00)
        colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 1.00)
        colors[clr.Border]                 = ImVec4(0.70, 0.70, 0.70, 0.40)
        colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
        colors[clr.FrameBg]                = ImVec4(0.15, 0.15, 0.15, 1.00)
        colors[clr.FrameBgHovered]         = ImVec4(0.19, 0.19, 0.19, 0.71)
        colors[clr.FrameBgActive]          = ImVec4(0.34, 0.34, 0.34, 0.79)
        colors[clr.TitleBg]                = ImVec4(0.00, 0.69, 0.33, 0.80)
        colors[clr.TitleBgActive]          = ImVec4(0.00, 0.74, 0.36, 1.00)
        colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.69, 0.33, 0.50)
        colors[clr.MenuBarBg]              = ImVec4(0.00, 0.80, 0.38, 1.00)
        colors[clr.ScrollbarBg]            = ImVec4(0.16, 0.16, 0.16, 1.00)
        colors[clr.ScrollbarGrab]          = ImVec4(0.00, 0.69, 0.33, 1.00)
        colors[clr.ScrollbarGrabHovered]   = ImVec4(0.00, 0.82, 0.39, 1.00)
        colors[clr.ScrollbarGrabActive]    = ImVec4(0.00, 1.00, 0.48, 1.00)
        colors[clr.ComboBg]                = ImVec4(0.20, 0.20, 0.20, 0.99)
        colors[clr.CheckMark]              = ImVec4(0.00, 0.69, 0.33, 1.00)
        colors[clr.SliderGrab]             = ImVec4(0.00, 0.69, 0.33, 1.00)
        colors[clr.SliderGrabActive]       = ImVec4(0.00, 0.77, 0.37, 1.00)
        colors[clr.Button]                 = ImVec4(0.00, 0.69, 0.33, 1.00)
        colors[clr.ButtonHovered]          = ImVec4(0.00, 0.82, 0.39, 1.00)
        colors[clr.ButtonActive]           = ImVec4(0.00, 0.87, 0.42, 1.00)
        colors[clr.Header]                 = ImVec4(0.00, 0.69, 0.33, 1.00)
        colors[clr.HeaderHovered]          = ImVec4(0.00, 0.76, 0.37, 0.57)
        colors[clr.HeaderActive]           = ImVec4(0.00, 0.88, 0.42, 0.89)
        colors[clr.Separator]              = ImVec4(1.00, 1.00, 1.00, 0.40)
        colors[clr.SeparatorHovered]       = ImVec4(1.00, 1.00, 1.00, 0.60)
        colors[clr.SeparatorActive]        = ImVec4(1.00, 1.00, 1.00, 0.80)
        colors[clr.ResizeGrip]             = ImVec4(0.00, 0.69, 0.33, 1.00)
        colors[clr.ResizeGripHovered]      = ImVec4(0.00, 0.76, 0.37, 1.00)
        colors[clr.ResizeGripActive]       = ImVec4(0.00, 0.86, 0.41, 1.00)
        colors[clr.CloseButton]            = ImVec4(0.00, 0.82, 0.39, 1.00)
        colors[clr.CloseButtonHovered]     = ImVec4(0.00, 0.88, 0.42, 1.00)
        colors[clr.CloseButtonActive]      = ImVec4(0.00, 1.00, 0.48, 1.00)
        colors[clr.PlotLines]              = ImVec4(0.00, 0.69, 0.33, 1.00)
        colors[clr.PlotLinesHovered]       = ImVec4(0.00, 0.74, 0.36, 1.00)
        colors[clr.PlotHistogram]          = ImVec4(0.00, 0.69, 0.33, 1.00)
        colors[clr.PlotHistogramHovered]   = ImVec4(0.00, 0.80, 0.38, 1.00)
        colors[clr.TextSelectedBg]         = ImVec4(0.00, 0.69, 0.33, 0.72)
        colors[clr.ModalWindowDarkening]   = ImVec4(0.17, 0.17, 0.17, 0.48)
    elseif id == 5 then --red
        colors[clr.FrameBg]                = ImVec4(0.48, 0.16, 0.16, 0.54)
        colors[clr.FrameBgHovered]         = ImVec4(0.98, 0.26, 0.26, 0.40)
        colors[clr.FrameBgActive]          = ImVec4(0.98, 0.26, 0.26, 0.67)
        colors[clr.TitleBg]                = ImVec4(0.04, 0.04, 0.04, 1.00)
        colors[clr.TitleBgActive]          = ImVec4(0.48, 0.16, 0.16, 1.00)
        colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51)
        colors[clr.CheckMark]              = ImVec4(0.98, 0.26, 0.26, 1.00)
        colors[clr.SliderGrab]             = ImVec4(0.88, 0.26, 0.24, 1.00)
        colors[clr.SliderGrabActive]       = ImVec4(0.98, 0.26, 0.26, 1.00)
        colors[clr.Button]                 = ImVec4(0.98, 0.26, 0.26, 0.40)
        colors[clr.ButtonHovered]          = ImVec4(0.98, 0.26, 0.26, 1.00)
        colors[clr.ButtonActive]           = ImVec4(0.98, 0.06, 0.06, 1.00)
        colors[clr.Header]                 = ImVec4(0.98, 0.26, 0.26, 0.31)
        colors[clr.HeaderHovered]          = ImVec4(0.98, 0.26, 0.26, 0.80)
        colors[clr.HeaderActive]           = ImVec4(0.98, 0.26, 0.26, 1.00)
        colors[clr.Separator]              = colors[clr.Border]
        colors[clr.SeparatorHovered]       = ImVec4(0.75, 0.10, 0.10, 0.78)
        colors[clr.SeparatorActive]        = ImVec4(0.75, 0.10, 0.10, 1.00)
        colors[clr.ResizeGrip]             = ImVec4(0.98, 0.26, 0.26, 0.25)
        colors[clr.ResizeGripHovered]      = ImVec4(0.98, 0.26, 0.26, 0.67)
        colors[clr.ResizeGripActive]       = ImVec4(0.98, 0.26, 0.26, 0.95)
        colors[clr.TextSelectedBg]         = ImVec4(0.98, 0.26, 0.26, 0.35)
        colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, 1.00)
        colors[clr.TextDisabled]           = ImVec4(0.50, 0.50, 0.50, 1.00)
        colors[clr.WindowBg]               = ImVec4(0.06, 0.06, 0.06, 0.94)
        colors[clr.ChildWindowBg]          = ImVec4(1.00, 1.00, 1.00, 0.00)
        colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94)
        colors[clr.ComboBg]                = colors[clr.PopupBg]
        colors[clr.Border]                 = ImVec4(0.43, 0.43, 0.50, 0.50)
        colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
        colors[clr.MenuBarBg]              = ImVec4(0.14, 0.14, 0.14, 1.00)
        colors[clr.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
        colors[clr.ScrollbarGrab]          = ImVec4(0.31, 0.31, 0.31, 1.00)
        colors[clr.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
        colors[clr.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
        colors[clr.CloseButton]            = ImVec4(0.41, 0.41, 0.41, 0.50)
        colors[clr.CloseButtonHovered]     = ImVec4(0.98, 0.39, 0.36, 1.00)
        colors[clr.CloseButtonActive]      = ImVec4(0.98, 0.39, 0.36, 1.00)
        colors[clr.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00)
        colors[clr.PlotLinesHovered]       = ImVec4(1.00, 0.43, 0.35, 1.00)
        colors[clr.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
        colors[clr.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
        colors[clr.ModalWindowDarkening]   = ImVec4(0.80, 0.80, 0.80, 0.35)
    elseif id == 6 then --violet
        colors[clr.WindowBg]              = ImVec4(0.14, 0.12, 0.16, 1.00);
        colors[clr.ChildWindowBg]         = ImVec4(0.30, 0.20, 0.39, 0.00);
        colors[clr.PopupBg]               = ImVec4(0.05, 0.05, 0.10, 0.90);
        colors[clr.Border]                = ImVec4(0.89, 0.85, 0.92, 0.30);
        colors[clr.BorderShadow]          = ImVec4(0.00, 0.00, 0.00, 0.00);
        colors[clr.FrameBg]               = ImVec4(0.30, 0.20, 0.39, 1.00);
        colors[clr.FrameBgHovered]        = ImVec4(0.41, 0.19, 0.63, 0.68);
        colors[clr.FrameBgActive]         = ImVec4(0.41, 0.19, 0.63, 1.00);
        colors[clr.TitleBg]               = ImVec4(0.41, 0.19, 0.63, 0.45);
        colors[clr.TitleBgCollapsed]      = ImVec4(0.41, 0.19, 0.63, 0.35);
        colors[clr.TitleBgActive]         = ImVec4(0.41, 0.19, 0.63, 0.78);
        colors[clr.MenuBarBg]             = ImVec4(0.30, 0.20, 0.39, 0.57);
        colors[clr.ScrollbarBg]           = ImVec4(0.30, 0.20, 0.39, 1.00);
        colors[clr.ScrollbarGrab]         = ImVec4(0.41, 0.19, 0.63, 0.31);
        colors[clr.ScrollbarGrabHovered]  = ImVec4(0.41, 0.19, 0.63, 0.78);
        colors[clr.ScrollbarGrabActive]   = ImVec4(0.41, 0.19, 0.63, 1.00);
        colors[clr.ComboBg]               = ImVec4(0.30, 0.20, 0.39, 1.00);
        colors[clr.CheckMark]             = ImVec4(0.56, 0.61, 1.00, 1.00);
        colors[clr.SliderGrab]            = ImVec4(0.41, 0.19, 0.63, 0.24);
        colors[clr.SliderGrabActive]      = ImVec4(0.41, 0.19, 0.63, 1.00);
        colors[clr.Button]                = ImVec4(0.41, 0.19, 0.63, 0.44);
        colors[clr.ButtonHovered]         = ImVec4(0.41, 0.19, 0.63, 0.86);
        colors[clr.ButtonActive]          = ImVec4(0.64, 0.33, 0.94, 1.00);
        colors[clr.Header]                = ImVec4(0.41, 0.19, 0.63, 0.76);
        colors[clr.HeaderHovered]         = ImVec4(0.41, 0.19, 0.63, 0.86);
        colors[clr.HeaderActive]          = ImVec4(0.41, 0.19, 0.63, 1.00);
        colors[clr.ResizeGrip]            = ImVec4(0.41, 0.19, 0.63, 0.20);
        colors[clr.ResizeGripHovered]     = ImVec4(0.41, 0.19, 0.63, 0.78);
        colors[clr.ResizeGripActive]      = ImVec4(0.41, 0.19, 0.63, 1.00);
        colors[clr.CloseButton]           = ImVec4(1.00, 1.00, 1.00, 0.75);
        colors[clr.CloseButtonHovered]    = ImVec4(0.88, 0.74, 1.00, 0.59);
        colors[clr.CloseButtonActive]     = ImVec4(0.88, 0.85, 0.92, 1.00);
        colors[clr.PlotLines]             = ImVec4(0.89, 0.85, 0.92, 0.63);
        colors[clr.PlotLinesHovered]      = ImVec4(0.41, 0.19, 0.63, 1.00);
        colors[clr.PlotHistogram]         = ImVec4(0.89, 0.85, 0.92, 0.63);
        colors[clr.PlotHistogramHovered]  = ImVec4(0.41, 0.19, 0.63, 1.00);
        colors[clr.TextSelectedBg]        = ImVec4(0.41, 0.19, 0.63, 0.43);
        colors[clr.ModalWindowDarkening]  = ImVec4(0.20, 0.20, 0.20, 0.35);
    end
end
лично мне нравится зеленый, то есть 4 стиль

как то можно записывать корды чего либо в конфиг? например ищу я по штату определенные объекты, можно получать их корды и как записывать в конфиг?
А можешь скинуть фулл код типо обьеденить мой и то что ты кинул пожайлусто )
 
Последнее редактирование:

KOLBASKA@

Участник
35
0
Вот практикую луа и вот такакя проблема не работатет команда, где ошибка

require = "lib.moonloader"


function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do wait(100) end
sampRegisterChatCommand("stt", cmd_mas)
end
function cmd_mas()
-- array = {1, 2, 3, 4}
-- for i=1, 8 do
sampAddChatMessage("i")

end
 

Ononimus

Потрачен
60
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
я просто взял со своего скрипта стили и тебе скинул.

стили не помню чьи
ну типо обьяденить и сделать из этого единный код

Вот практикую луа и вот такакя проблема не работатет команда, где ошибка

require = "lib.moonloader"


function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do wait(100) end
sampRegisterChatCommand("stt", cmd_mas)
end
function cmd_mas()
-- array = {1, 2, 3, 4}
-- for i=1, 8 do
sampAddChatMessage("i")

end
скинь кодом по возможности
 

Pelmeska

Известный
931
232
Вот практикую луа и вот такакя проблема не работатет команда, где ошибка

require = "lib.moonloader"


function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do wait(100) end
sampRegisterChatCommand("stt", cmd_mas)
end
function cmd_mas()
-- array = {1, 2, 3, 4}
-- for i=1, 8 do
sampAddChatMessage("i")

end
Lua:
function main()
    while not isSampAvailable() do wait(0) end
    sampRegisterChatCommand("stt", cmd_mas)
    while true do
        wait(0)       
    end
end

function cmd_mas()
    -- array = {1, 2, 3, 4}
   -- for i=1, 8 do
    sampAddChatMessage("i")
end
 

Ononimus

Потрачен
60
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Lua:
-- в main
style() -- в скобки пиши какой тебе надо, от 0 до 6

-- этот кусок можешь в конец скрипта вставить, не в другую функцию!
function style(id)
    imgui.SwitchContext()
    local style = imgui.GetStyle()
    local colors = style.Colors
    local clr = imgui.Col
    local ImVec4 = imgui.ImVec4

    style.WindowRounding = 2.0
    style.WindowTitleAlign = imgui.ImVec2(0.5, 0.5)
    style.ChildWindowRounding = 2.0
    style.FrameRounding = 2.0
    style.ItemSpacing = imgui.ImVec2(5.0, 4.0)
    style.ScrollbarSize = 13.0
    style.ScrollbarRounding = 0
    style.GrabMinSize = 8.0
    style.GrabRounding = 1.0
    if id == 0 then -- dark - orange
        colors[clr.Text] = ImVec4(0.80, 0.80, 0.83, 1.00)
        colors[clr.TextDisabled] = ImVec4(0.24, 0.23, 0.29, 1.00)
        colors[clr.WindowBg] = ImVec4(0.06, 0.05, 0.07, 1.00)
        colors[clr.ChildWindowBg] = ImVec4(0.07, 0.07, 0.09, 1.00)
        colors[clr.PopupBg] = ImVec4(0.07, 0.07, 0.09, 1.00)
        colors[clr.Border] = ImVec4(0.80, 0.80, 0.83, 0.88)
        colors[clr.BorderShadow] = ImVec4(0.92, 0.91, 0.88, 0.00)
        colors[clr.FrameBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
        colors[clr.FrameBgHovered] = ImVec4(0.24, 0.23, 0.29, 1.00)
        colors[clr.FrameBgActive] = ImVec4(0.56, 0.56, 0.58, 1.00)
        colors[clr.TitleBg] = ImVec4(0.76, 0.31, 0.00, 1.00)
        colors[clr.TitleBgCollapsed] = ImVec4(1.00, 0.98, 0.95, 0.75)
        colors[clr.TitleBgActive] = ImVec4(0.80, 0.33, 0.00, 1.00)
        colors[clr.MenuBarBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
        colors[clr.ScrollbarBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
        colors[clr.ScrollbarGrab] = ImVec4(0.80, 0.80, 0.83, 0.31)
        colors[clr.ScrollbarGrabHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
        colors[clr.ScrollbarGrabActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
        colors[clr.ComboBg] = ImVec4(0.19, 0.18, 0.21, 1.00)
        colors[clr.CheckMark] = ImVec4(1.00, 0.42, 0.00, 0.53)
        colors[clr.SliderGrab] = ImVec4(1.00, 0.42, 0.00, 0.53)
        colors[clr.SliderGrabActive] = ImVec4(1.00, 0.42, 0.00, 1.00)
        colors[clr.Button] = ImVec4(0.10, 0.09, 0.12, 1.00)
        colors[clr.ButtonHovered] = ImVec4(0.24, 0.23, 0.29, 1.00)
        colors[clr.ButtonActive] = ImVec4(0.56, 0.56, 0.58, 1.00)
        colors[clr.Header] = ImVec4(0.10, 0.09, 0.12, 1.00)
        colors[clr.HeaderHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
        colors[clr.HeaderActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
        colors[clr.ResizeGrip] = ImVec4(0.00, 0.00, 0.00, 0.00)
        colors[clr.ResizeGripHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
        colors[clr.ResizeGripActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
        colors[clr.CloseButton] = ImVec4(0.40, 0.39, 0.38, 0.16)
        colors[clr.CloseButtonHovered] = ImVec4(0.40, 0.39, 0.38, 0.39)
        colors[clr.CloseButtonActive] = ImVec4(0.40, 0.39, 0.38, 1.00)
        colors[clr.PlotLines] = ImVec4(0.40, 0.39, 0.38, 0.63)
        colors[clr.PlotLinesHovered] = ImVec4(0.25, 1.00, 0.00, 1.00)
        colors[clr.PlotHistogram] = ImVec4(0.40, 0.39, 0.38, 0.63)
        colors[clr.PlotHistogramHovered] = ImVec4(0.25, 1.00, 0.00, 1.00)
        colors[clr.TextSelectedBg] = ImVec4(0.25, 1.00, 0.00, 0.43)
        colors[clr.ModalWindowDarkening] = ImVec4(1.00, 0.98, 0.95, 0.73)

    elseif id == 1 then -- blue
        colors[clr.FrameBg]                 = ImVec4(0.16, 0.29, 0.48, 0.54)
        colors[clr.FrameBgHovered]          = ImVec4(0.26, 0.59, 0.98, 0.40)
        colors[clr.FrameBgActive]           = ImVec4(0.26, 0.59, 0.98, 0.67)
        colors[clr.TitleBg]                 = ImVec4(0.04, 0.04, 0.04, 1.00)
        colors[clr.TitleBgActive]           = ImVec4(0.16, 0.29, 0.48, 1.00)
        colors[clr.TitleBgCollapsed]        = ImVec4(0.00, 0.00, 0.00, 0.51)
        colors[clr.CheckMark]               = ImVec4(0.26, 0.59, 0.98, 1.00)
        colors[clr.SliderGrab]              = ImVec4(0.24, 0.52, 0.88, 1.00)
        colors[clr.SliderGrabActive]        = ImVec4(0.26, 0.59, 0.98, 1.00)
        colors[clr.Button]                  = ImVec4(0.26, 0.59, 0.98, 0.40)
        colors[clr.ButtonHovered]           = ImVec4(0.26, 0.59, 0.98, 1.00)
        colors[clr.ButtonActive]            = ImVec4(0.06, 0.53, 0.98, 1.00)
        colors[clr.Header]                  = ImVec4(0.26, 0.59, 0.98, 0.31)
        colors[clr.HeaderHovered]           = ImVec4(0.26, 0.59, 0.98, 0.80)
        colors[clr.HeaderActive]            = ImVec4(0.26, 0.59, 0.98, 1.00)
        colors[clr.Separator]               = colors[clr.Border]
        colors[clr.SeparatorHovered]        = ImVec4(0.26, 0.59, 0.98, 0.78)
        colors[clr.SeparatorActive]         = ImVec4(0.26, 0.59, 0.98, 1.00)
        colors[clr.ResizeGrip]              = ImVec4(0.26, 0.59, 0.98, 0.25)
        colors[clr.ResizeGripHovered]       = ImVec4(0.26, 0.59, 0.98, 0.67)
        colors[clr.ResizeGripActive]        = ImVec4(0.26, 0.59, 0.98, 0.95)
        colors[clr.TextSelectedBg]          = ImVec4(0.26, 0.59, 0.98, 0.35)
        colors[clr.Text]                    = ImVec4(1.00, 1.00, 1.00, 1.00)
        colors[clr.TextDisabled]            = ImVec4(0.50, 0.50, 0.50, 1.00)
        colors[clr.WindowBg]                = ImVec4(0.06, 0.06, 0.06, 0.94)
        colors[clr.ChildWindowBg]           = ImVec4(1.00, 1.00, 1.00, 0.00)
        colors[clr.PopupBg]                 = ImVec4(0.08, 0.08, 0.08, 0.94)
        colors[clr.ComboBg]                 = colors[clr.PopupBg]
        colors[clr.Border]                  = ImVec4(0.43, 0.43, 0.50, 0.50)
        colors[clr.BorderShadow]            = ImVec4(0.00, 0.00, 0.00, 0.00)
        colors[clr.MenuBarBg]               = ImVec4(0.14, 0.14, 0.14, 1.00)
        colors[clr.ScrollbarBg]             = ImVec4(0.02, 0.02, 0.02, 0.53)
        colors[clr.ScrollbarGrab]           = ImVec4(0.31, 0.31, 0.31, 1.00)
        colors[clr.ScrollbarGrabHovered]    = ImVec4(0.41, 0.41, 0.41, 1.00)
        colors[clr.ScrollbarGrabActive]     = ImVec4(0.51, 0.51, 0.51, 1.00)
        colors[clr.CloseButton]             = ImVec4(0.41, 0.41, 0.41, 0.50)
        colors[clr.CloseButtonHovered]      = ImVec4(0.98, 0.39, 0.36, 1.00)
        colors[clr.CloseButtonActive]       = ImVec4(0.98, 0.39, 0.36, 1.00)
        colors[clr.PlotLines]               = ImVec4(0.61, 0.61, 0.61, 1.00)
        colors[clr.PlotLinesHovered]        = ImVec4(1.00, 0.43, 0.35, 1.00)
        colors[clr.PlotHistogram]           = ImVec4(0.90, 0.70, 0.00, 1.00)
        colors[clr.PlotHistogramHovered]    = ImVec4(1.00, 0.60, 0.00, 1.00)
        colors[clr.ModalWindowDarkening]    = ImVec4(0.80, 0.80, 0.80, 0.35)
    elseif id == 2 then -- dark
        colors[clr.Text]                    = ImVec4(0.80, 0.80, 0.83, 1.00)
        colors[clr.TextDisabled]            = ImVec4(0.24, 0.23, 0.29, 1.00)
        colors[clr.WindowBg]                = ImVec4(0.06, 0.05, 0.07, 1.00)
        colors[clr.ChildWindowBg]           = ImVec4(0.07, 0.07, 0.09, 1.00)
        colors[clr.PopupBg]                 = ImVec4(0.07, 0.07, 0.09, 1.00)
        colors[clr.Border]                  = ImVec4(0.43, 0.43, 0.50, 0.50)
        colors[clr.BorderShadow]            = ImVec4(0.92, 0.91, 0.88, 0.00)
        colors[clr.FrameBg]                 = ImVec4(0.10, 0.09, 0.12, 1.00)
        colors[clr.FrameBgHovered]          = ImVec4(0.24, 0.23, 0.29, 1.00)
        colors[clr.FrameBgActive]           = ImVec4(0.56, 0.56, 0.58, 1.00)
        colors[clr.TitleBg]                 = ImVec4(0.10, 0.09, 0.12, 1.00)
        colors[clr.TitleBgCollapsed]        = ImVec4(1.00, 0.98, 0.95, 0.75)
        colors[clr.TitleBgActive]           = ImVec4(0.07, 0.07, 0.09, 1.00)
        colors[clr.MenuBarBg]               = ImVec4(0.10, 0.09, 0.12, 1.00)
        colors[clr.ScrollbarBg]             = ImVec4(0.10, 0.09, 0.12, 1.00)
        colors[clr.ScrollbarGrab]           = ImVec4(0.80, 0.80, 0.83, 0.31)
        colors[clr.ScrollbarGrabHovered]    = ImVec4(0.56, 0.56, 0.58, 1.00)
        colors[clr.ScrollbarGrabActive]     = ImVec4(0.06, 0.05, 0.07, 1.00)
        colors[clr.ComboBg]                 = ImVec4(0.19, 0.18, 0.21, 1.00)
        colors[clr.CheckMark]               = ImVec4(0.80, 0.80, 0.83, 0.31)
        colors[clr.SliderGrab]              = ImVec4(0.80, 0.80, 0.83, 0.31)
        colors[clr.SliderGrabActive]        = ImVec4(0.06, 0.05, 0.07, 1.00)
        colors[clr.Button]                  = ImVec4(0.10, 0.09, 0.12, 1.00)
        colors[clr.ButtonHovered]           = ImVec4(0.24, 0.23, 0.29, 1.00)
        colors[clr.ButtonActive]            = ImVec4(0.56, 0.56, 0.58, 1.00)
        colors[clr.Header]                  = ImVec4(0.10, 0.09, 0.12, 1.00)
        colors[clr.HeaderHovered]           = ImVec4(0.56, 0.56, 0.58, 1.00)
        colors[clr.HeaderActive]            = ImVec4(0.06, 0.05, 0.07, 1.00)
        colors[clr.ResizeGrip]              = ImVec4(0.00, 0.00, 0.00, 0.00)
        colors[clr.ResizeGripHovered]       = ImVec4(0.56, 0.56, 0.58, 1.00)
        colors[clr.ResizeGripActive]        = ImVec4(0.06, 0.05, 0.07, 1.00)
        colors[clr.CloseButton]             = ImVec4(0.40, 0.39, 0.38, 0.16)
        colors[clr.CloseButtonHovered]      = ImVec4(0.40, 0.39, 0.38, 0.39)
        colors[clr.CloseButtonActive]       = ImVec4(0.40, 0.39, 0.38, 1.00)
        colors[clr.PlotLines]               = ImVec4(0.40, 0.39, 0.38, 0.63)
        colors[clr.PlotLinesHovered]        = ImVec4(0.25, 1.00, 0.00, 1.00)
        colors[clr.PlotHistogram]           = ImVec4(0.40, 0.39, 0.38, 0.63)
        colors[clr.PlotHistogramHovered]    = ImVec4(0.25, 1.00, 0.00, 1.00)
        colors[clr.TextSelectedBg]          = ImVec4(0.25, 1.00, 0.00, 0.43)
        colors[clr.ModalWindowDarkening]    = ImVec4(1.00, 0.98, 0.95, 0.73)
    elseif id == 3 then -- cherry
        colors[clr.Text]                    = ImVec4(0.860, 0.930, 0.890, 0.78)
        colors[clr.TextDisabled]            = ImVec4(0.860, 0.930, 0.890, 0.28)
        colors[clr.WindowBg]                = ImVec4(0.13, 0.14, 0.17, 1.00)
        colors[clr.ChildWindowBg]           = ImVec4(0.200, 0.220, 0.270, 0.58)
        colors[clr.PopupBg]                 = ImVec4(0.200, 0.220, 0.270, 0.9)
        colors[clr.Border]                  = ImVec4(0.43, 0.43, 0.50, 0.50)
        colors[clr.BorderShadow]            = ImVec4(0.00, 0.00, 0.00, 0.00)
        colors[clr.FrameBg]                 = ImVec4(0.200, 0.220, 0.270, 1.00)
        colors[clr.FrameBgHovered]          = ImVec4(0.455, 0.198, 0.301, 0.78)
        colors[clr.FrameBgActive]           = ImVec4(0.455, 0.198, 0.301, 1.00)
        colors[clr.TitleBg]                 = ImVec4(0.232, 0.201, 0.271, 1.00)
        colors[clr.TitleBgActive]           = ImVec4(0.502, 0.075, 0.256, 1.00)
        colors[clr.TitleBgCollapsed]        = ImVec4(0.200, 0.220, 0.270, 0.75)
        colors[clr.MenuBarBg]               = ImVec4(0.200, 0.220, 0.270, 0.47)
        colors[clr.ScrollbarBg]             = ImVec4(0.200, 0.220, 0.270, 1.00)
        colors[clr.ScrollbarGrab]           = ImVec4(0.09, 0.15, 0.1, 1.00)
        colors[clr.ScrollbarGrabHovered]    = ImVec4(0.455, 0.198, 0.301, 0.78)
        colors[clr.ScrollbarGrabActive]     = ImVec4(0.455, 0.198, 0.301, 1.00)
        colors[clr.CheckMark]               = ImVec4(0.71, 0.22, 0.27, 1.00)
        colors[clr.SliderGrab]              = ImVec4(0.47, 0.77, 0.83, 0.14)
        colors[clr.SliderGrabActive]        = ImVec4(0.71, 0.22, 0.27, 1.00)
        colors[clr.Button]                  = ImVec4(0.47, 0.77, 0.83, 0.14)
        colors[clr.ButtonHovered]           = ImVec4(0.455, 0.198, 0.301, 0.86)
        colors[clr.ButtonActive]            = ImVec4(0.455, 0.198, 0.301, 1.00)
        colors[clr.Header]                  = ImVec4(0.455, 0.198, 0.301, 0.76)
        colors[clr.HeaderHovered]           = ImVec4(0.455, 0.198, 0.301, 0.86)
        colors[clr.HeaderActive]            = ImVec4(0.502, 0.075, 0.256, 1.00)
        colors[clr.ResizeGrip]              = ImVec4(0.47, 0.77, 0.83, 0.04)
        colors[clr.ResizeGripHovered]       = ImVec4(0.455, 0.198, 0.301, 0.78)
        colors[clr.ResizeGripActive]        = ImVec4(0.455, 0.198, 0.301, 1.00)
        colors[clr.PlotLines]               = ImVec4(0.860, 0.930, 0.890, 0.63)
        colors[clr.PlotLinesHovered]        = ImVec4(0.455, 0.198, 0.301, 1.00)
        colors[clr.PlotHistogram]           = ImVec4(0.860, 0.930, 0.890, 0.63)
        colors[clr.PlotHistogramHovered]    = ImVec4(0.455, 0.198, 0.301, 1.00)
        colors[clr.TextSelectedBg]          = ImVec4(0.455, 0.198, 0.301, 0.43)
        colors[clr.ModalWindowDarkening]    = ImVec4(0.200, 0.220, 0.270, 0.73)
    elseif id == 4 then -- dark green
        colors[clr.Text]                   = ImVec4(0.90, 0.90, 0.90, 1.00)
        colors[clr.TextDisabled]           = ImVec4(0.60, 0.60, 0.60, 1.00)
        colors[clr.WindowBg]               = ImVec4(0.08, 0.08, 0.08, 1.00)
        colors[clr.ChildWindowBg]          = ImVec4(0.10, 0.10, 0.10, 1.00)
        colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 1.00)
        colors[clr.Border]                 = ImVec4(0.70, 0.70, 0.70, 0.40)
        colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
        colors[clr.FrameBg]                = ImVec4(0.15, 0.15, 0.15, 1.00)
        colors[clr.FrameBgHovered]         = ImVec4(0.19, 0.19, 0.19, 0.71)
        colors[clr.FrameBgActive]          = ImVec4(0.34, 0.34, 0.34, 0.79)
        colors[clr.TitleBg]                = ImVec4(0.00, 0.69, 0.33, 0.80)
        colors[clr.TitleBgActive]          = ImVec4(0.00, 0.74, 0.36, 1.00)
        colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.69, 0.33, 0.50)
        colors[clr.MenuBarBg]              = ImVec4(0.00, 0.80, 0.38, 1.00)
        colors[clr.ScrollbarBg]            = ImVec4(0.16, 0.16, 0.16, 1.00)
        colors[clr.ScrollbarGrab]          = ImVec4(0.00, 0.69, 0.33, 1.00)
        colors[clr.ScrollbarGrabHovered]   = ImVec4(0.00, 0.82, 0.39, 1.00)
        colors[clr.ScrollbarGrabActive]    = ImVec4(0.00, 1.00, 0.48, 1.00)
        colors[clr.ComboBg]                = ImVec4(0.20, 0.20, 0.20, 0.99)
        colors[clr.CheckMark]              = ImVec4(0.00, 0.69, 0.33, 1.00)
        colors[clr.SliderGrab]             = ImVec4(0.00, 0.69, 0.33, 1.00)
        colors[clr.SliderGrabActive]       = ImVec4(0.00, 0.77, 0.37, 1.00)
        colors[clr.Button]                 = ImVec4(0.00, 0.69, 0.33, 1.00)
        colors[clr.ButtonHovered]          = ImVec4(0.00, 0.82, 0.39, 1.00)
        colors[clr.ButtonActive]           = ImVec4(0.00, 0.87, 0.42, 1.00)
        colors[clr.Header]                 = ImVec4(0.00, 0.69, 0.33, 1.00)
        colors[clr.HeaderHovered]          = ImVec4(0.00, 0.76, 0.37, 0.57)
        colors[clr.HeaderActive]           = ImVec4(0.00, 0.88, 0.42, 0.89)
        colors[clr.Separator]              = ImVec4(1.00, 1.00, 1.00, 0.40)
        colors[clr.SeparatorHovered]       = ImVec4(1.00, 1.00, 1.00, 0.60)
        colors[clr.SeparatorActive]        = ImVec4(1.00, 1.00, 1.00, 0.80)
        colors[clr.ResizeGrip]             = ImVec4(0.00, 0.69, 0.33, 1.00)
        colors[clr.ResizeGripHovered]      = ImVec4(0.00, 0.76, 0.37, 1.00)
        colors[clr.ResizeGripActive]       = ImVec4(0.00, 0.86, 0.41, 1.00)
        colors[clr.CloseButton]            = ImVec4(0.00, 0.82, 0.39, 1.00)
        colors[clr.CloseButtonHovered]     = ImVec4(0.00, 0.88, 0.42, 1.00)
        colors[clr.CloseButtonActive]      = ImVec4(0.00, 1.00, 0.48, 1.00)
        colors[clr.PlotLines]              = ImVec4(0.00, 0.69, 0.33, 1.00)
        colors[clr.PlotLinesHovered]       = ImVec4(0.00, 0.74, 0.36, 1.00)
        colors[clr.PlotHistogram]          = ImVec4(0.00, 0.69, 0.33, 1.00)
        colors[clr.PlotHistogramHovered]   = ImVec4(0.00, 0.80, 0.38, 1.00)
        colors[clr.TextSelectedBg]         = ImVec4(0.00, 0.69, 0.33, 0.72)
        colors[clr.ModalWindowDarkening]   = ImVec4(0.17, 0.17, 0.17, 0.48)
    elseif id == 5 then --red
        colors[clr.FrameBg]                = ImVec4(0.48, 0.16, 0.16, 0.54)
        colors[clr.FrameBgHovered]         = ImVec4(0.98, 0.26, 0.26, 0.40)
        colors[clr.FrameBgActive]          = ImVec4(0.98, 0.26, 0.26, 0.67)
        colors[clr.TitleBg]                = ImVec4(0.04, 0.04, 0.04, 1.00)
        colors[clr.TitleBgActive]          = ImVec4(0.48, 0.16, 0.16, 1.00)
        colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51)
        colors[clr.CheckMark]              = ImVec4(0.98, 0.26, 0.26, 1.00)
        colors[clr.SliderGrab]             = ImVec4(0.88, 0.26, 0.24, 1.00)
        colors[clr.SliderGrabActive]       = ImVec4(0.98, 0.26, 0.26, 1.00)
        colors[clr.Button]                 = ImVec4(0.98, 0.26, 0.26, 0.40)
        colors[clr.ButtonHovered]          = ImVec4(0.98, 0.26, 0.26, 1.00)
        colors[clr.ButtonActive]           = ImVec4(0.98, 0.06, 0.06, 1.00)
        colors[clr.Header]                 = ImVec4(0.98, 0.26, 0.26, 0.31)
        colors[clr.HeaderHovered]          = ImVec4(0.98, 0.26, 0.26, 0.80)
        colors[clr.HeaderActive]           = ImVec4(0.98, 0.26, 0.26, 1.00)
        colors[clr.Separator]              = colors[clr.Border]
        colors[clr.SeparatorHovered]       = ImVec4(0.75, 0.10, 0.10, 0.78)
        colors[clr.SeparatorActive]        = ImVec4(0.75, 0.10, 0.10, 1.00)
        colors[clr.ResizeGrip]             = ImVec4(0.98, 0.26, 0.26, 0.25)
        colors[clr.ResizeGripHovered]      = ImVec4(0.98, 0.26, 0.26, 0.67)
        colors[clr.ResizeGripActive]       = ImVec4(0.98, 0.26, 0.26, 0.95)
        colors[clr.TextSelectedBg]         = ImVec4(0.98, 0.26, 0.26, 0.35)
        colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, 1.00)
        colors[clr.TextDisabled]           = ImVec4(0.50, 0.50, 0.50, 1.00)
        colors[clr.WindowBg]               = ImVec4(0.06, 0.06, 0.06, 0.94)
        colors[clr.ChildWindowBg]          = ImVec4(1.00, 1.00, 1.00, 0.00)
        colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94)
        colors[clr.ComboBg]                = colors[clr.PopupBg]
        colors[clr.Border]                 = ImVec4(0.43, 0.43, 0.50, 0.50)
        colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
        colors[clr.MenuBarBg]              = ImVec4(0.14, 0.14, 0.14, 1.00)
        colors[clr.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
        colors[clr.ScrollbarGrab]          = ImVec4(0.31, 0.31, 0.31, 1.00)
        colors[clr.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
        colors[clr.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
        colors[clr.CloseButton]            = ImVec4(0.41, 0.41, 0.41, 0.50)
        colors[clr.CloseButtonHovered]     = ImVec4(0.98, 0.39, 0.36, 1.00)
        colors[clr.CloseButtonActive]      = ImVec4(0.98, 0.39, 0.36, 1.00)
        colors[clr.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00)
        colors[clr.PlotLinesHovered]       = ImVec4(1.00, 0.43, 0.35, 1.00)
        colors[clr.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
        colors[clr.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
        colors[clr.ModalWindowDarkening]   = ImVec4(0.80, 0.80, 0.80, 0.35)
    elseif id == 6 then --violet
        colors[clr.WindowBg]              = ImVec4(0.14, 0.12, 0.16, 1.00);
        colors[clr.ChildWindowBg]         = ImVec4(0.30, 0.20, 0.39, 0.00);
        colors[clr.PopupBg]               = ImVec4(0.05, 0.05, 0.10, 0.90);
        colors[clr.Border]                = ImVec4(0.89, 0.85, 0.92, 0.30);
        colors[clr.BorderShadow]          = ImVec4(0.00, 0.00, 0.00, 0.00);
        colors[clr.FrameBg]               = ImVec4(0.30, 0.20, 0.39, 1.00);
        colors[clr.FrameBgHovered]        = ImVec4(0.41, 0.19, 0.63, 0.68);
        colors[clr.FrameBgActive]         = ImVec4(0.41, 0.19, 0.63, 1.00);
        colors[clr.TitleBg]               = ImVec4(0.41, 0.19, 0.63, 0.45);
        colors[clr.TitleBgCollapsed]      = ImVec4(0.41, 0.19, 0.63, 0.35);
        colors[clr.TitleBgActive]         = ImVec4(0.41, 0.19, 0.63, 0.78);
        colors[clr.MenuBarBg]             = ImVec4(0.30, 0.20, 0.39, 0.57);
        colors[clr.ScrollbarBg]           = ImVec4(0.30, 0.20, 0.39, 1.00);
        colors[clr.ScrollbarGrab]         = ImVec4(0.41, 0.19, 0.63, 0.31);
        colors[clr.ScrollbarGrabHovered]  = ImVec4(0.41, 0.19, 0.63, 0.78);
        colors[clr.ScrollbarGrabActive]   = ImVec4(0.41, 0.19, 0.63, 1.00);
        colors[clr.ComboBg]               = ImVec4(0.30, 0.20, 0.39, 1.00);
        colors[clr.CheckMark]             = ImVec4(0.56, 0.61, 1.00, 1.00);
        colors[clr.SliderGrab]            = ImVec4(0.41, 0.19, 0.63, 0.24);
        colors[clr.SliderGrabActive]      = ImVec4(0.41, 0.19, 0.63, 1.00);
        colors[clr.Button]                = ImVec4(0.41, 0.19, 0.63, 0.44);
        colors[clr.ButtonHovered]         = ImVec4(0.41, 0.19, 0.63, 0.86);
        colors[clr.ButtonActive]          = ImVec4(0.64, 0.33, 0.94, 1.00);
        colors[clr.Header]                = ImVec4(0.41, 0.19, 0.63, 0.76);
        colors[clr.HeaderHovered]         = ImVec4(0.41, 0.19, 0.63, 0.86);
        colors[clr.HeaderActive]          = ImVec4(0.41, 0.19, 0.63, 1.00);
        colors[clr.ResizeGrip]            = ImVec4(0.41, 0.19, 0.63, 0.20);
        colors[clr.ResizeGripHovered]     = ImVec4(0.41, 0.19, 0.63, 0.78);
        colors[clr.ResizeGripActive]      = ImVec4(0.41, 0.19, 0.63, 1.00);
        colors[clr.CloseButton]           = ImVec4(1.00, 1.00, 1.00, 0.75);
        colors[clr.CloseButtonHovered]    = ImVec4(0.88, 0.74, 1.00, 0.59);
        colors[clr.CloseButtonActive]     = ImVec4(0.88, 0.85, 0.92, 1.00);
        colors[clr.PlotLines]             = ImVec4(0.89, 0.85, 0.92, 0.63);
        colors[clr.PlotLinesHovered]      = ImVec4(0.41, 0.19, 0.63, 1.00);
        colors[clr.PlotHistogram]         = ImVec4(0.89, 0.85, 0.92, 0.63);
        colors[clr.PlotHistogramHovered]  = ImVec4(0.41, 0.19, 0.63, 1.00);
        colors[clr.TextSelectedBg]        = ImVec4(0.41, 0.19, 0.63, 0.43);
        colors[clr.ModalWindowDarkening]  = ImVec4(0.20, 0.20, 0.20, 0.35);
    end
end
лично мне нравится зеленый, то есть 4 стиль

как то можно записывать корды чего либо в конфиг? например ищу я по штату определенные объекты, можно получать их корды и как записывать в конфиг?
Можжешь это обьеденить пожайлусто у меня почему то не робит когда я обьеденить пытаюсб

ебят а как сделать в имгуи когда нажимаешь на ункнцию допустим кнопка "Отыграть дигл" то при нажатие на эту кнопку отыгрывался дигл?
 
Последнее редактирование:

melody.

Участник
36
3
Вот практикую луа и вот такакя проблема не работатет команда, где ошибка

require = "lib.moonloader"


function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do wait(100) end
sampRegisterChatCommand("stt", cmd_mas)
end
function cmd_mas()
-- array = {1, 2, 3, 4}
-- for i=1, 8 do
sampAddChatMessage("i")

end
require 'lib.moonloader' без равно, isSampLoaded or not isSampfuncsLoaded с маленькой буквы funcs,
 
  • Нравится
Реакции: KOLBASKA@

Ononimus

Потрачен
60
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Ребят помогите как сделать в скрипте на имгуи что бы при нажатие на функцию отыгровалось бы рп? киньте код
 

KOLBASKA@

Участник
35
0
изучаю масив хочу вывести его, за коментировал потому-что не выводился в чат
 

KOLBASKA@

Участник
35
0
всё равно не выводится в чат букви і, хотя в сампфунк пишет скрипт загружен


Lua:
require "lib.moonloader"


function main()
    if not isSampfuncsLoaded() or not isSampLoaded() then return end
    while not isSampAvailable() do wait(100) end
    sampRegisterChatCommand("stt", cmd_mas)
end
function cmd_mas()
    -- array = {1, 2, 3, 4}
   -- for i=1, 8 do
    sampAddChatMessage("i")
   
end
 

Ononimus

Потрачен
60
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Ребят помогите как сделать в скрипте на имгуи что бы при нажатие на функцию отыгровалось бы рп? киньте код ПОЖАЙЛУСТО
 

Pelmeska

Известный
931
232
всё равно не выводится в чат букви і, хотя в сампфунк пишет скрипт загружен


Lua:
require "lib.moonloader"


function main()
    if not isSampfuncsLoaded() or not isSampLoaded() then return end
    while not isSampAvailable() do wait(100) end
    sampRegisterChatCommand("stt", cmd_mas)
end
function cmd_mas()
    -- array = {1, 2, 3, 4}
   -- for i=1, 8 do
    sampAddChatMessage("i")
  
end
я тебе сверху скинул готовый фикшенный код