Помогите со скриптом

h0los

Активный
Автор темы
192
30
Версия SA-MP
  1. 0.3.7-R3
  2. 0.3.7-R4
в скрипте стоит сохранение в кфг, нажимаю на галочку к примеру выхожу из игры захожу не сохраняется помогите
require "lib.moonloader"
local vkeys = require "vkeys"
local rkeys = require "rkeys"
local imgui = require "imgui"
local inicfg = require 'inicfg'
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8
local mainIni = inicfg.load({
config =
{
vklnomh = false,
text_buffer_name = " "
}
}, "HelperNomerov")
local vklnomh = imgui.ImBool(mainIni.config.vklnomh)
local status = inicfg.load(mainIni, 'HelperNomerov.ini')
if not doesFileExist('moonloader/config/HelperNomerov.ini') then inicfg.save(mainIni, 'HelperNomerov.ini') end
local main_window_state = imgui.ImBool(false)
local text_buffer_name = imgui.ImBuffer(''..mainIni.config.text_buffer_name, 500)
function imgui.OnDrawFrame()
imgui.ShowCursor = main_window_state.v
if main_window_state.v then
imgui.SetNextWindowSize(imgui.ImVec2(700, 450), imgui.Cond.FirstUseEver)
imgui.Begin("HelperNomerov", main_window_state, imgui.WindowFlags.NoResize)
imgui.Text(u8:decode"Привет друг! Давай познакомимся в этом хелпере!")
imgui.InputText(u8:decode'Как тебя зовут?', text_buffer_name)
imgui.Separator()
imgui.Text(u8:decode"Все базовые настройки:")
if imgui.Checkbox(u8:decode"Включить сам скрипт", vklnomh) then
imgui.Text(u8:decode"Скрипт включен")
end
imgui.Separator()
imgui.SetCursorPosX((imgui.GetWindowWidth()-imgui.CalcTextSize('by Hol0s').x)/2)
imgui.TextDisabled('by Hol0s')
imgui.End()
end
end
function main()
sampRegisterChatCommand("nomh", cmd_nomh)
sampAddChatMessage(u8:decode"{F0E68C}[HelperNomerov]{FFFFFF}Скрипт запущен! /nomh")
sampAddChatMessage(u8:decode"{F0E68C}[HelperNomerov]{FFFFFF}Создатель скрипта Holos! /nomh")
imgui.Process = true
while true do
wait(0)
end
end
function cmd_nomh()
main_window_state.v = not main_window_state.v
imgui.Process = main_window_state.v
end


function BH_theme()
imgui.SwitchContext()
local style = imgui.GetStyle()
local colors = style.Colors
local clr = imgui.Col
local ImVec4 = imgui.ImVec4
local ImVec2 = imgui.ImVec2

style.WindowPadding = ImVec2(6, 4)
style.WindowRounding = 5.0
style.ChildWindowRounding = 5.0
style.FramePadding = ImVec2(5, 2)
style.FrameRounding = 5.0
style.ItemSpacing = ImVec2(7, 5)
style.ItemInnerSpacing = ImVec2(1, 1)
style.TouchExtraPadding = ImVec2(0, 0)
style.IndentSpacing = 6.0
style.ScrollbarSize = 12.0
style.ScrollbarRounding = 5.0
style.GrabMinSize = 20.0
style.GrabRounding = 2.0
style.WindowTitleAlign = ImVec2(0.5, 0.5)
colors[clr.Text] = ImVec4(1.00, 1.00, 1.00, 1.00)
colors[clr.TextDisabled] = ImVec4(0.28, 0.30, 0.35, 1.00)
colors[clr.WindowBg] = ImVec4(0.16, 0.18, 0.22, 1.00)
colors[clr.ChildWindowBg] = ImVec4(0.19, 0.22, 0.26, 1)
colors[clr.PopupBg] = ImVec4(0.05, 0.05, 0.10, 0.90)
colors[clr.Border] = ImVec4(0.19, 0.22, 0.26, 1.00)
colors[clr.BorderShadow] = ImVec4(0.00, 0.00, 0.00, 0.00)
colors[clr.FrameBg] = ImVec4(0.19, 0.22, 0.26, 1.00)
colors[clr.FrameBgHovered] = ImVec4(0.22, 0.25, 0.30, 1.00)
colors[clr.FrameBgActive] = ImVec4(0.22, 0.25, 0.29, 1.00)
colors[clr.TitleBg] = ImVec4(0.19, 0.22, 0.26, 1.00)
colors[clr.TitleBgActive] = ImVec4(0.19, 0.22, 0.26, 1.00)
colors[clr.TitleBgCollapsed] = ImVec4(0.19, 0.22, 0.26, 0.59)
colors[clr.MenuBarBg] = ImVec4(0.19, 0.22, 0.26, 1.00)
colors[clr.ScrollbarBg] = ImVec4(0.20, 0.25, 0.30, 0.60)
colors[clr.ScrollbarGrab] = ImVec4(0.41, 0.55, 0.78, 1.00)
colors[clr.ScrollbarGrabHovered] = ImVec4(0.49, 0.63, 0.86, 1.00)
colors[clr.ScrollbarGrabActive] = ImVec4(0.49, 0.63, 0.86, 1.00)
colors[clr.ComboBg] = ImVec4(0.20, 0.20, 0.20, 0.99)
colors[clr.CheckMark] = ImVec4(0.90, 0.90, 0.90, 0.50)
colors[clr.SliderGrab] = ImVec4(1.00, 1.00, 1.00, 0.30)
colors[clr.SliderGrabActive] = ImVec4(0.80, 0.50, 0.50, 1.00)
colors[clr.Button] = ImVec4(0.41, 0.55, 0.78, 1.00)
colors[clr.ButtonHovered] = ImVec4(0.49, 0.62, 0.85, 1.00)
colors[clr.ButtonActive] = ImVec4(0.49, 0.62, 0.85, 1.00)
colors[clr.Header] = ImVec4(0.19, 0.22, 0.26, 1.00)
colors[clr.HeaderHovered] = ImVec4(0.22, 0.24, 0.28, 1.00)
colors[clr.HeaderActive] = ImVec4(0.22, 0.24, 0.28, 1.00)
colors[clr.Separator] = ImVec4(0.41, 0.55, 0.78, 1.00)
colors[clr.SeparatorHovered] = ImVec4(0.41, 0.55, 0.78, 1.00)
colors[clr.SeparatorActive] = ImVec4(0.41, 0.55, 0.78, 1.00)
colors[clr.ResizeGrip] = ImVec4(0.41, 0.55, 0.78, 1.00)
colors[clr.ResizeGripHovered] = ImVec4(0.49, 0.61, 0.83, 1.00)
colors[clr.ResizeGripActive] = ImVec4(0.49, 0.62, 0.83, 1.00)
colors[clr.CloseButton] = ImVec4(0.41, 0.55, 0.78, 1.00)
colors[clr.CloseButtonHovered] = ImVec4(0.50, 0.63, 0.84, 1.00)
colors[clr.CloseButtonActive] = ImVec4(0.41, 0.55, 0.78, 1.00)
colors[clr.PlotLines] = ImVec4(1.00, 1.00, 1.00, 1.00)
colors[clr.PlotLinesHovered] = ImVec4(0.90, 0.70, 0.00, 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.TextSelectedBg] = ImVec4(0.41, 0.55, 0.78, 1.00)
colors[clr.ModalWindowDarkening] = ImVec4(0.16, 0.18, 0.22, 0.76)
end
BH_theme()
Заранее спасибо
 
  • Bug
Реакции: SeregaIvanovis

SeregaIvanovis

Активный
118
33
в скрипте стоит сохранение в кфг, нажимаю на галочку к примеру выхожу из игры захожу не сохраняется помогите
require "lib.moonloader"
local vkeys = require "vkeys"
local rkeys = require "rkeys"
local imgui = require "imgui"
local inicfg = require 'inicfg'
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8
local mainIni = inicfg.load({
config =
{
vklnomh = false,
text_buffer_name = " "
}
}, "HelperNomerov")
local vklnomh = imgui.ImBool(mainIni.config.vklnomh)
local status = inicfg.load(mainIni, 'HelperNomerov.ini')
if not doesFileExist('moonloader/config/HelperNomerov.ini') then inicfg.save(mainIni, 'HelperNomerov.ini') end
local main_window_state = imgui.ImBool(false)
local text_buffer_name = imgui.ImBuffer(''..mainIni.config.text_buffer_name, 500)
function imgui.OnDrawFrame()
imgui.ShowCursor = main_window_state.v
if main_window_state.v then
imgui.SetNextWindowSize(imgui.ImVec2(700, 450), imgui.Cond.FirstUseEver)
imgui.Begin("HelperNomerov", main_window_state, imgui.WindowFlags.NoResize)
imgui.Text(u8:decode"Привет друг! Давай познакомимся в этом хелпере!")
imgui.InputText(u8:decode'Как тебя зовут?', text_buffer_name)
imgui.Separator()
imgui.Text(u8:decode"Все базовые настройки:")
if imgui.Checkbox(u8:decode"Включить сам скрипт", vklnomh) then
imgui.Text(u8:decode"Скрипт включен")
end
imgui.Separator()
imgui.SetCursorPosX((imgui.GetWindowWidth()-imgui.CalcTextSize('by Hol0s').x)/2)
imgui.TextDisabled('by Hol0s')
imgui.End()
end
end
function main()
sampRegisterChatCommand("nomh", cmd_nomh)
sampAddChatMessage(u8:decode"{F0E68C}[HelperNomerov]{FFFFFF}Скрипт запущен! /nomh")
sampAddChatMessage(u8:decode"{F0E68C}[HelperNomerov]{FFFFFF}Создатель скрипта Holos! /nomh")
imgui.Process = true
while true do
wait(0)
end
end
function cmd_nomh()
main_window_state.v = not main_window_state.v
imgui.Process = main_window_state.v
end


function BH_theme()
imgui.SwitchContext()
local style = imgui.GetStyle()
local colors = style.Colors
local clr = imgui.Col
local ImVec4 = imgui.ImVec4
local ImVec2 = imgui.ImVec2

style.WindowPadding = ImVec2(6, 4)
style.WindowRounding = 5.0
style.ChildWindowRounding = 5.0
style.FramePadding = ImVec2(5, 2)
style.FrameRounding = 5.0
style.ItemSpacing = ImVec2(7, 5)
style.ItemInnerSpacing = ImVec2(1, 1)
style.TouchExtraPadding = ImVec2(0, 0)
style.IndentSpacing = 6.0
style.ScrollbarSize = 12.0
style.ScrollbarRounding = 5.0
style.GrabMinSize = 20.0
style.GrabRounding = 2.0
style.WindowTitleAlign = ImVec2(0.5, 0.5)
colors[clr.Text] = ImVec4(1.00, 1.00, 1.00, 1.00)
colors[clr.TextDisabled] = ImVec4(0.28, 0.30, 0.35, 1.00)
colors[clr.WindowBg] = ImVec4(0.16, 0.18, 0.22, 1.00)
colors[clr.ChildWindowBg] = ImVec4(0.19, 0.22, 0.26, 1)
colors[clr.PopupBg] = ImVec4(0.05, 0.05, 0.10, 0.90)
colors[clr.Border] = ImVec4(0.19, 0.22, 0.26, 1.00)
colors[clr.BorderShadow] = ImVec4(0.00, 0.00, 0.00, 0.00)
colors[clr.FrameBg] = ImVec4(0.19, 0.22, 0.26, 1.00)
colors[clr.FrameBgHovered] = ImVec4(0.22, 0.25, 0.30, 1.00)
colors[clr.FrameBgActive] = ImVec4(0.22, 0.25, 0.29, 1.00)
colors[clr.TitleBg] = ImVec4(0.19, 0.22, 0.26, 1.00)
colors[clr.TitleBgActive] = ImVec4(0.19, 0.22, 0.26, 1.00)
colors[clr.TitleBgCollapsed] = ImVec4(0.19, 0.22, 0.26, 0.59)
colors[clr.MenuBarBg] = ImVec4(0.19, 0.22, 0.26, 1.00)
colors[clr.ScrollbarBg] = ImVec4(0.20, 0.25, 0.30, 0.60)
colors[clr.ScrollbarGrab] = ImVec4(0.41, 0.55, 0.78, 1.00)
colors[clr.ScrollbarGrabHovered] = ImVec4(0.49, 0.63, 0.86, 1.00)
colors[clr.ScrollbarGrabActive] = ImVec4(0.49, 0.63, 0.86, 1.00)
colors[clr.ComboBg] = ImVec4(0.20, 0.20, 0.20, 0.99)
colors[clr.CheckMark] = ImVec4(0.90, 0.90, 0.90, 0.50)
colors[clr.SliderGrab] = ImVec4(1.00, 1.00, 1.00, 0.30)
colors[clr.SliderGrabActive] = ImVec4(0.80, 0.50, 0.50, 1.00)
colors[clr.Button] = ImVec4(0.41, 0.55, 0.78, 1.00)
colors[clr.ButtonHovered] = ImVec4(0.49, 0.62, 0.85, 1.00)
colors[clr.ButtonActive] = ImVec4(0.49, 0.62, 0.85, 1.00)
colors[clr.Header] = ImVec4(0.19, 0.22, 0.26, 1.00)
colors[clr.HeaderHovered] = ImVec4(0.22, 0.24, 0.28, 1.00)
colors[clr.HeaderActive] = ImVec4(0.22, 0.24, 0.28, 1.00)
colors[clr.Separator] = ImVec4(0.41, 0.55, 0.78, 1.00)
colors[clr.SeparatorHovered] = ImVec4(0.41, 0.55, 0.78, 1.00)
colors[clr.SeparatorActive] = ImVec4(0.41, 0.55, 0.78, 1.00)
colors[clr.ResizeGrip] = ImVec4(0.41, 0.55, 0.78, 1.00)
colors[clr.ResizeGripHovered] = ImVec4(0.49, 0.61, 0.83, 1.00)
colors[clr.ResizeGripActive] = ImVec4(0.49, 0.62, 0.83, 1.00)
colors[clr.CloseButton] = ImVec4(0.41, 0.55, 0.78, 1.00)
colors[clr.CloseButtonHovered] = ImVec4(0.50, 0.63, 0.84, 1.00)
colors[clr.CloseButtonActive] = ImVec4(0.41, 0.55, 0.78, 1.00)
colors[clr.PlotLines] = ImVec4(1.00, 1.00, 1.00, 1.00)
colors[clr.PlotLinesHovered] = ImVec4(0.90, 0.70, 0.00, 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.TextSelectedBg] = ImVec4(0.41, 0.55, 0.78, 1.00)
colors[clr.ModalWindowDarkening] = ImVec4(0.16, 0.18, 0.22, 0.76)
end
BH_theme()
Заранее спасибо
а где функция сохранения собственно?
 

h0los

Активный
Автор темы
192
30
а где функция сохранения собственно?
Должно тут:
local mainIni = inicfg.load({
config =
{
vklnomh = false,
text_buffer_name = " "
}
}, "HelperNomerov")
И тут:
local vklnomh = imgui.ImBool(mainIni.config.vklnomh)
И тут тоже дожно:
if imgui.Checkbox(u8:decode"Включить сам скрипт", vklnomh) then
   imgui.Text(u8:decode"Скрипт включен")
end
 

SeregaIvanovis

Активный
118
33
Должно тут:
local mainIni = inicfg.load({
config =
{
vklnomh = false,
text_buffer_name = " "
}
}, "HelperNomerov")
И тут:
local vklnomh = imgui.ImBool(mainIni.config.vklnomh)
И тут тоже дожно:
if imgui.Checkbox(u8:decode"Включить сам скрипт", vklnomh) then
   imgui.Text(u8:decode"Скрипт включен")
end
тут только загрузка.... можеш в моем скрипт чекнуть сохранение в конциг (он в попдписи)
 

SeregaIvanovis

Активный
118
33
я наверное тупой. Сможешь помочь сделать сохранение?
я из луа ушол из скрипта моего вырежи он на 2 странице с сохранением в подписи сылка

Lua:
ini.vrtext.vrt1 = u8:decode(ffi.string(inputField))
                    ini.vrtext.vrt2 = u8:decode(ffi.string(textvr2))
                    ini.vrtext.vrt3 = u8:decode(ffi.string(textvr3))
                    ini.fbtext.fbt1 = u8:decode(ffi.string(textfb1))
                    ini.fbtext.fbt2 = u8:decode(ffi.string(textfb2))
                    ini.fbtext.fbt3 = u8:decode(ffi.string(textfb3))
                    ini.famtext.famt1 = u8:decode(ffi.string(textfam1))
                    ini.famtext.famt2 = u8:decode(ffi.string(textfam2))
                    ini.famtext.famt3 = u8:decode(ffi.string(textfam3))
                    ini.adtext.adt = u8:decode(ffi.string(textad))
                    notf.addNotification(string.format("[Autopiar] ��������� �������!!!!!!!!!"), 10)
                    inicfg.save(ini, ininame)
Типо так акк то
 

h0los

Активный
Автор темы
192
30
я из луа ушол из скрипта моего вырежи он на 2 странице с сохранением в подписи сылка
что самое вырезать?
Весь твой код:
--==libs==--
require 'lib.moonloader'
local imgui = require 'mimgui' -- ���������� ���������� ������
local encoding = require 'encoding' -- ���������� ���������� ��� ������ � ������� �����������
encoding.default = 'CP1251' -- ����� ��������� �� ���������
local u8 = encoding.UTF8
local ffi = require 'ffi'
local sampev = require 'lib.samp.events'
local new = imgui.new
local faicons = require('fAwesome6')
local inicfg = require("inicfg")
local notf = import 'imgui_notf.lua'
local colorList = {u8'�������', u8'������',u8'�����', u8'����������'}
local colorListNumber = new.int()
local colorListBuffer = new['const char*'][#colorList](colorList)
--==locals==--
local ininame = ("autopiaar.ini")
local ini = inicfg.load(inicfg.load({
    themes = {
        number = 3
    },
    vrtext = {
        vrt1 = '',
        vrt2 = '',
        vrt3 = ''
    },
    fbtext = {
        fbt1 = '',
        fbt2 = '',
        fbt3 = ''
    },
    famtext = {
        famt1 = '',
        famt2 = '',
        famt3 = ''
    },
    adtext = {
        adt = '',
    },
}, ininame))
inicfg.save(ini, ininame)

--==ints==--
local delayvr1 = new.int(10)
local delayvr2 = new.int(1)
local delayvr3 = new.int(1)
local delayfb1 = new.int(10)
local delayfb2 = new.int(10)
local delayfb3 = new.int(10)
local delaytwovr = new.int(10)
local delaytwofb = new.int(10)
local tab = 1
local delayfam1 = new.int(10)
local delayfam2 = new.int(10)
local delayfam3 = new.int(10)
local addelay = new.int(30)
--==chars==--
local textvr2 = new.char[236](u8(ini.vrtext.vrt2))
local textvr3 = new.char[256](u8(ini.vrtext.vrt3))
local inputField = new.char[256](u8(ini.vrtext.vrt1))
local textfam1 = new.char[256](u8(ini.famtext.famt1))
local textfam2 = new.char[256](u8(ini.famtext.famt2))
local textfam3 = new.char[256](u8(ini.famtext.famt3))
local textfb1 = new.char[256](u8(ini.fbtext.fbt1))
local textfb2 = new.char[256](u8(ini.fbtext.fbt2))
local textfb3 = new.char[256](u8(ini.fbtext.fbt3))
local textad = new.char[256](u8(ini.adtext.adt))
--==bool==--
local vrpiar = false
local vrpiar2 = false
local vrpiar3 = false
local fbpiar1 = false
local fbpiar2 = false
local fbpiar3 = false
local fampiar1 = false
local fampiar2 = false
local fampiar3 = false
local WinState = new.bool()
local vrdialog = new.bool()
local showid = new.bool()
local sfradio = new.bool()
local lvradio = new.bool()
local lsradio = new.bool()
local bspiar = new.bool()
local sfpiar = false
local lvpiar = false
local lspiar = false
local enable_autoupdate = true
local autoupdate_loaded = false
local Update = nil
local bis = false
local alpiar = false
local alpiar2 = false
local alpiar3 = false
--==theme==--
theme = {
    {
        change = function()
            local ImVec4 = imgui.ImVec4
            imgui.SwitchContext()
            imgui.GetStyle().Colors[imgui.Col.Text]                   = ImVec4(1.00, 1.00, 1.00, 1.00)
            imgui.GetStyle().Colors[imgui.Col.TextDisabled]           = ImVec4(0.50, 0.50, 0.50, 1.00)
            imgui.GetStyle().Colors[imgui.Col.WindowBg]               = ImVec4(0.06, 0.06, 0.06, 0.94)
            imgui.GetStyle().Colors[imgui.Col.ChildBg]                = ImVec4(1.00, 1.00, 1.00, 0.00)
            imgui.GetStyle().Colors[imgui.Col.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94)
            imgui.GetStyle().Colors[imgui.Col.Border]                 = ImVec4(0.43, 0.43, 0.50, 0.50)
            imgui.GetStyle().Colors[imgui.Col.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
            imgui.GetStyle().Colors[imgui.Col.FrameBg]                = ImVec4(0.48, 0.16, 0.16, 0.54)
            imgui.GetStyle().Colors[imgui.Col.FrameBgHovered]         = ImVec4(0.98, 0.26, 0.26, 0.40)
            imgui.GetStyle().Colors[imgui.Col.FrameBgActive]          = ImVec4(0.98, 0.26, 0.26, 0.67)
            imgui.GetStyle().Colors[imgui.Col.TitleBg]                = ImVec4(0.04, 0.04, 0.04, 1.00)
            imgui.GetStyle().Colors[imgui.Col.TitleBgActive]          = ImVec4(0.48, 0.16, 0.16, 1.00)
            imgui.GetStyle().Colors[imgui.Col.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51)
            imgui.GetStyle().Colors[imgui.Col.MenuBarBg]              = ImVec4(0.14, 0.14, 0.14, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
            imgui.GetStyle().Colors[imgui.Col.ScrollbarGrab]          = ImVec4(0.31, 0.31, 0.31, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
            imgui.GetStyle().Colors[imgui.Col.CheckMark]              = ImVec4(0.98, 0.26, 0.26, 1.00)
            imgui.GetStyle().Colors[imgui.Col.SliderGrab]             = ImVec4(0.88, 0.26, 0.24, 1.00)
            imgui.GetStyle().Colors[imgui.Col.SliderGrabActive]       = ImVec4(0.98, 0.26, 0.26, 1.00)
            imgui.GetStyle().Colors[imgui.Col.Button]                 = ImVec4(0.98, 0.26, 0.26, 0.40)
            imgui.GetStyle().Colors[imgui.Col.ButtonHovered]          = ImVec4(0.98, 0.26, 0.26, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ButtonActive]           = ImVec4(0.98, 0.06, 0.06, 1.00)
            imgui.GetStyle().Colors[imgui.Col.Header]                 = ImVec4(0.98, 0.26, 0.26, 0.31)
            imgui.GetStyle().Colors[imgui.Col.HeaderHovered]          = ImVec4(0.98, 0.26, 0.26, 0.80)
            imgui.GetStyle().Colors[imgui.Col.HeaderActive]           = ImVec4(0.98, 0.26, 0.26, 1.00)
            imgui.GetStyle().Colors[imgui.Col.Separator]              = ImVec4(0.43, 0.43, 0.50, 0.50)
            imgui.GetStyle().Colors[imgui.Col.SeparatorHovered]       = ImVec4(0.75, 0.10, 0.10, 0.78)
            imgui.GetStyle().Colors[imgui.Col.SeparatorActive]        = ImVec4(0.75, 0.10, 0.10, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ResizeGrip]             = ImVec4(0.98, 0.26, 0.26, 0.25)
            imgui.GetStyle().Colors[imgui.Col.ResizeGripHovered]      = ImVec4(0.98, 0.26, 0.26, 0.67)
            imgui.GetStyle().Colors[imgui.Col.ResizeGripActive]       = ImVec4(0.98, 0.26, 0.26, 0.95)
            imgui.GetStyle().Colors[imgui.Col.Tab]                    = ImVec4(0.98, 0.26, 0.26, 0.40)
            imgui.GetStyle().Colors[imgui.Col.TabHovered]             = ImVec4(0.98, 0.26, 0.26, 1.00)
            imgui.GetStyle().Colors[imgui.Col.TabActive]              = ImVec4(0.98, 0.06, 0.06, 1.00)
            imgui.GetStyle().Colors[imgui.Col.TabUnfocused]           = ImVec4(0.98, 0.26, 0.26, 1.00)
            imgui.GetStyle().Colors[imgui.Col.TabUnfocusedActive]     = ImVec4(0.98, 0.26, 0.26, 1.00)
            imgui.GetStyle().Colors[imgui.Col.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00)
            imgui.GetStyle().Colors[imgui.Col.PlotLinesHovered]       = ImVec4(1.00, 0.43, 0.35, 1.00)
            imgui.GetStyle().Colors[imgui.Col.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
            imgui.GetStyle().Colors[imgui.Col.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
            imgui.GetStyle().Colors[imgui.Col.TextSelectedBg]         = ImVec4(0.98, 0.26, 0.26, 0.35)
        end
    },
    {
        change = function()
            local ImVec4 = imgui.ImVec4
            imgui.SwitchContext()
            imgui.GetStyle().Colors[imgui.Col.Text]                   = ImVec4(0.90, 0.90, 0.90, 1.00)
            imgui.GetStyle().Colors[imgui.Col.TextDisabled]           = ImVec4(0.60, 0.60, 0.60, 1.00)
            imgui.GetStyle().Colors[imgui.Col.WindowBg]               = ImVec4(0.08, 0.08, 0.08, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ChildBg]                = ImVec4(0.10, 0.10, 0.10, 1.00)
            imgui.GetStyle().Colors[imgui.Col.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 1.00)
            imgui.GetStyle().Colors[imgui.Col.Border]                 = ImVec4(0.70, 0.70, 0.70, 0.40)
            imgui.GetStyle().Colors[imgui.Col.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
            imgui.GetStyle().Colors[imgui.Col.FrameBg]                = ImVec4(0.15, 0.15, 0.15, 1.00)
            imgui.GetStyle().Colors[imgui.Col.FrameBgHovered]         = ImVec4(0.19, 0.19, 0.19, 0.71)
            imgui.GetStyle().Colors[imgui.Col.FrameBgActive]          = ImVec4(0.34, 0.34, 0.34, 0.79)
            imgui.GetStyle().Colors[imgui.Col.TitleBg]                = ImVec4(0.00, 0.69, 0.33, 0.80)
            imgui.GetStyle().Colors[imgui.Col.TitleBgActive]          = ImVec4(0.00, 0.74, 0.36, 1.00)
            imgui.GetStyle().Colors[imgui.Col.TitleBgCollapsed]       = ImVec4(0.00, 0.69, 0.33, 0.50)
            imgui.GetStyle().Colors[imgui.Col.MenuBarBg]              = ImVec4(0.00, 0.80, 0.38, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ScrollbarBg]            = ImVec4(0.16, 0.16, 0.16, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ScrollbarGrab]          = ImVec4(0.00, 0.69, 0.33, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ScrollbarGrabHovered]   = ImVec4(0.00, 0.82, 0.39, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ScrollbarGrabActive]    = ImVec4(0.00, 1.00, 0.48, 1.00)
            imgui.GetStyle().Colors[imgui.Col.CheckMark]              = ImVec4(0.00, 0.69, 0.33, 1.00)
            imgui.GetStyle().Colors[imgui.Col.SliderGrab]             = ImVec4(0.00, 0.69, 0.33, 1.00)
            imgui.GetStyle().Colors[imgui.Col.SliderGrabActive]       = ImVec4(0.00, 0.77, 0.37, 1.00)
            imgui.GetStyle().Colors[imgui.Col.Button]                 = ImVec4(0.00, 0.69, 0.33, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ButtonHovered]          = ImVec4(0.00, 0.82, 0.39, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ButtonActive]           = ImVec4(0.00, 0.87, 0.42, 1.00)
            imgui.GetStyle().Colors[imgui.Col.Header]                 = ImVec4(0.00, 0.69, 0.33, 1.00)
            imgui.GetStyle().Colors[imgui.Col.HeaderHovered]          = ImVec4(0.00, 0.76, 0.37, 0.57)
            imgui.GetStyle().Colors[imgui.Col.HeaderActive]           = ImVec4(0.00, 0.88, 0.42, 0.89)
            imgui.GetStyle().Colors[imgui.Col.Separator]              = ImVec4(1.00, 1.00, 1.00, 0.40)
            imgui.GetStyle().Colors[imgui.Col.SeparatorHovered]       = ImVec4(1.00, 1.00, 1.00, 0.60)
            imgui.GetStyle().Colors[imgui.Col.SeparatorActive]        = ImVec4(1.00, 1.00, 1.00, 0.80)
            imgui.GetStyle().Colors[imgui.Col.ResizeGrip]             = ImVec4(0.00, 0.69, 0.33, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ResizeGripHovered]      = ImVec4(0.00, 0.76, 0.37, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ResizeGripActive]       = ImVec4(0.00, 0.86, 0.41, 1.00)
            imgui.GetStyle().Colors[imgui.Col.PlotLines]              = ImVec4(0.00, 0.69, 0.33, 1.00)
            imgui.GetStyle().Colors[imgui.Col.PlotLinesHovered]       = ImVec4(0.00, 0.74, 0.36, 1.00)
            imgui.GetStyle().Colors[imgui.Col.PlotHistogram]          = ImVec4(0.00, 0.69, 0.33, 1.00)
            imgui.GetStyle().Colors[imgui.Col.PlotHistogramHovered]   = ImVec4(0.00, 0.80, 0.38, 1.00)
            imgui.GetStyle().Colors[imgui.Col.TextSelectedBg]         = ImVec4(0.00, 0.69, 0.33, 0.72)
        end
    },
    {
        change = function()
            local ImVec4 = imgui.ImVec4
            
            imgui.SwitchContext()
            imgui.GetStyle().Colors[imgui.Col.WindowBg]               = ImVec4(0.08, 0.08, 0.08, 1.00)
            imgui.GetStyle().Colors[imgui.Col.FrameBg]                = ImVec4(0.16, 0.29, 0.48, 0.54)
            imgui.GetStyle().Colors[imgui.Col.FrameBgHovered]         = ImVec4(0.26, 0.59, 0.98, 0.40)
            imgui.GetStyle().Colors[imgui.Col.FrameBgActive]          = ImVec4(0.26, 0.59, 0.98, 0.67)
            imgui.GetStyle().Colors[imgui.Col.TitleBg]                = ImVec4(0.04, 0.04, 0.04, 1.00)
            imgui.GetStyle().Colors[imgui.Col.TitleBgActive]          = ImVec4(0.16, 0.29, 0.48, 1.00)
            imgui.GetStyle().Colors[imgui.Col.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51)
            imgui.GetStyle().Colors[imgui.Col.CheckMark]              = ImVec4(0.26, 0.59, 0.98, 1.00)
            imgui.GetStyle().Colors[imgui.Col.SliderGrab]             = ImVec4(0.24, 0.52, 0.88, 1.00)
            imgui.GetStyle().Colors[imgui.Col.SliderGrabActive]       = ImVec4(0.26, 0.59, 0.98, 1.00)
            imgui.GetStyle().Colors[imgui.Col.Button]                 = ImVec4(0.26, 0.59, 0.98, 0.40)
            imgui.GetStyle().Colors[imgui.Col.ButtonHovered]          = ImVec4(0.26, 0.59, 0.98, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ButtonActive]           = ImVec4(0.06, 0.53, 0.98, 1.00)
            imgui.GetStyle().Colors[imgui.Col.Header]                 = ImVec4(0.26, 0.59, 0.98, 0.31)
            imgui.GetStyle().Colors[imgui.Col.HeaderHovered]          = ImVec4(0.26, 0.59, 0.98, 0.80)
            imgui.GetStyle().Colors[imgui.Col.HeaderActive]           = ImVec4(0.26, 0.59, 0.98, 1.00)
            imgui.GetStyle().Colors[imgui.Col.Separator]              = ImVec4(0.43, 0.43, 0.50, 0.50)
            imgui.GetStyle().Colors[imgui.Col.SeparatorHovered]       = ImVec4(0.26, 0.59, 0.98, 0.78)
            imgui.GetStyle().Colors[imgui.Col.SeparatorActive]        = ImVec4(0.26, 0.59, 0.98, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ResizeGrip]             = ImVec4(0.26, 0.59, 0.98, 0.25)
            imgui.GetStyle().Colors[imgui.Col.ResizeGripHovered]      = ImVec4(0.26, 0.59, 0.98, 0.67)
            imgui.GetStyle().Colors[imgui.Col.ResizeGripActive]       = ImVec4(0.26, 0.59, 0.98, 0.95)
            imgui.GetStyle().Colors[imgui.Col.TextSelectedBg]         = ImVec4(0.26, 0.59, 0.98, 0.35)
            imgui.GetStyle().Colors[imgui.Col.Text]                   = ImVec4(1.00, 1.00, 1.00, 1.00)
            imgui.GetStyle().Colors[imgui.Col.TextDisabled]           = ImVec4(0.50, 0.50, 0.50, 1.00)
            imgui.GetStyle().Colors[imgui.Col.WindowBg]               = ImVec4(0.06, 0.53, 0.98, 0.70)
            imgui.GetStyle().Colors[imgui.Col.ChildBg]                = ImVec4(0.10, 0.10, 0.10, 1.00)
            imgui.GetStyle().Colors[imgui.Col.PopupBg]                = ImVec4(0.06, 0.53, 0.98, 0.70)
            imgui.GetStyle().Colors[imgui.Col.Border]                 = ImVec4(0.43, 0.43, 0.50, 0.50)
            imgui.GetStyle().Colors[imgui.Col.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
            imgui.GetStyle().Colors[imgui.Col.MenuBarBg]              = ImVec4(0.14, 0.14, 0.14, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
            imgui.GetStyle().Colors[imgui.Col.ScrollbarGrab]          = ImVec4(0.31, 0.31, 0.31, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
            imgui.GetStyle().Colors[imgui.Col.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00)
            imgui.GetStyle().Colors[imgui.Col.PlotLinesHovered]       = ImVec4(1.00, 0.43, 0.35, 1.00)
            imgui.GetStyle().Colors[imgui.Col.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
            imgui.GetStyle().Colors[imgui.Col.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
        end
    },
    {
        change = function()
            imgui.SwitchContext()
            local style = imgui.GetStyle()
            local colors = style.Colors
            local clr = imgui.Col
            local ImVec4 = imgui.ImVec4
            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.15, 0.16, 0.37, 1.00)
            colors[clr.ChildBg]                = ImVec4(0.17, 0.18, 0.43, 1.00)
            colors[clr.PopupBg]                = colors[clr.WindowBg]

            colors[clr.Border]                 = ImVec4(0.33, 0.34, 0.62, 1.00)
            colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)

            colors[clr.TitleBg]                = ImVec4(0.18, 0.20, 0.46, 1.00)
            colors[clr.TitleBgActive]          = ImVec4(0.18, 0.20, 0.46, 1.00)
            colors[clr.TitleBgCollapsed]       = ImVec4(0.18, 0.20, 0.46, 1.00)
            colors[clr.MenuBarBg]              = colors[clr.ChildBg]

            colors[clr.ScrollbarBg]            = ImVec4(0.14, 0.14, 0.36, 1.00)
            colors[clr.ScrollbarGrab]          = ImVec4(0.22, 0.22, 0.53, 1.00)
            colors[clr.ScrollbarGrabHovered]   = ImVec4(0.20, 0.21, 0.53, 1.00)
            colors[clr.ScrollbarGrabActive]    = ImVec4(0.25, 0.25, 0.58, 1.00)

            colors[clr.Button]                 = ImVec4(0.25, 0.25, 0.58, 1.00)
            colors[clr.ButtonHovered]          = ImVec4(0.23, 0.23, 0.55, 1.00)
            colors[clr.ButtonActive]           = ImVec4(0.27, 0.27, 0.62, 1.00)

            colors[clr.CheckMark]              = ImVec4(0.39, 0.39, 0.83, 1.00)
            colors[clr.SliderGrab]             = ImVec4(0.39, 0.39, 0.83, 1.00)
            colors[clr.SliderGrabActive]       = ImVec4(0.48, 0.48, 0.96, 1.00)

            colors[clr.FrameBg]                = colors[clr.Button]
            colors[clr.FrameBgHovered]         = colors[clr.ButtonHovered]
            colors[clr.FrameBgActive]          = colors[clr.ButtonActive]

            colors[clr.Header]                 = colors[clr.Button]
            colors[clr.HeaderHovered]          = colors[clr.ButtonHovered]
            colors[clr.HeaderActive]           = colors[clr.ButtonActive]

            colors[clr.Separator]              = ImVec4(0.43, 0.43, 0.50, 0.50)
            colors[clr.SeparatorHovered]       = colors[clr.SliderGrabActive]
            colors[clr.SeparatorActive]        = colors[clr.SliderGrabActive]

            colors[clr.ResizeGrip]             = colors[clr.Button]
            colors[clr.ResizeGripHovered]      = colors[clr.ButtonHovered]
            colors[clr.ResizeGripActive]       = colors[clr.ButtonActive]

            colors[clr.Tab]                    = colors[clr.Button]
            colors[clr.TabHovered]             = colors[clr.ButtonHovered]
            colors[clr.TabActive]              = colors[clr.ButtonActive]
            colors[clr.TabUnfocused]           = colors[clr.Button]
            colors[clr.TabUnfocusedActive]     = colors[clr.Button]

            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.TextSelectedBg]         = ImVec4(0.33, 0.33, 0.57, 1.00)
            colors[clr.DragDropTarget]         = ImVec4(1.00, 1.00, 0.00, 0.90)

            colors[clr.NavHighlight]           = ImVec4(0.26, 0.59, 0.98, 1.00)
            colors[clr.NavWindowingHighlight]  = ImVec4(1.00, 1.00, 1.00, 0.70)
            colors[clr.NavWindowingDimBg]      = ImVec4(0.80, 0.80, 0.80, 0.20)

            colors[clr.ModalWindowDimBg]       = ImVec4(0.00, 0.00, 0.00, 0.90)
        end
    },
}

--==main==--
function sampev.onShowDialog(dialogId, style, title, button1, button2, textxxxx)
    if vrpiar or vrpiar2 or vrpiar3 then
        if textxxxx:find("���� ��������� �������� ��������") and button1 == "��" and not sampIsCursorActive() then
            sampSendDialogResponse(dialogId, 1, -1, -1)
            return false
        end
    end
    if button1 == "��������" then
        return false
    end
    if lspiar or lvpiar or sfpiar then
        if lspiar then
            sampSendDialogResponse(25476, 1, 0, -1)
            if bis then
                sampSendDialogResponse(15346, 1, 3, -1)
            else
                sampSendDialogResponse(15346, 1, 0, -1)
            end
            sampSendDialogResponse(15347, 1, -1, -1)
        end
        if lvpiar then
            sampSendDialogResponse(25476, 1, 1, -1)
            if bis then
                sampSendDialogResponse(15346, 1, 3, -1)
            else
                sampSendDialogResponse(15346, 1, 0, -1)
            end
            sampSendDialogResponse(15347, 1, -1, -1)
        end
        if sfpiar then
            sampSendDialogResponse(25476, 1, 2, -1)
            if bis then
                sampSendDialogResponse(15346, 1, 3, -1)
            else
                sampSendDialogResponse(15346, 1, 0, -1)
            end
            sampSendDialogResponse(15347, 1, -1, -1)
        end
        if dialogId == 25476 or dialogId == 15346 or dialogId == 15347 then
            return false
        end
        
        
    end
    return true
end
imgui.OnFrame(function() return WinState[0] end,
    function(player)
        imgui.SetNextWindowPos(imgui.ImVec2(500,500), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5)) -- �������� �� ��������� ���� �� ������
        imgui.SetNextWindowSize(imgui.ImVec2(840, 545), imgui.Cond.Always) -- �������� �� ������ ����
        imgui.Begin(u8'��������', WinState, imgui.WindowFlags.NoResize) -- �������� �� ����������� ����, ��� ��������� � �����
        if imgui.Button(u8' ���� � /vr', imgui.ImVec2(200, 125)) then tab = 1 end
        if imgui.Button(faicons("gun")..u8' ���� � /fb|/rb', imgui.ImVec2(200, 125)) then tab = 2 end
        if imgui.Button(faicons("person")..u8' ���� � /fam|/al', imgui.ImVec2(200, 125)) then tab = 3 end
        if imgui.Button(faicons('gear')..u8' ���������', imgui.ImVec2(200, 125)) then tab = 4 end
        imgui.SetCursorPos(imgui.ImVec2(220, 30))
        if imgui.BeginChild('Name##'..tab, imgui.ImVec2(600, 490), true) then
            --==vrpiar==--
            if tab == 1 then
                imgui.Text(u8"/vr 1 ����������")
                if imgui.Button(u8"��������: "..tostring(vrpiar), imgui.ImVec2(185, 20)) then vrpiar = not vrpiar end
                imgui.SameLine()
                imgui.InputTextWithHint(u8'##��� ������', u8'����� ����� � /vr', inputField, 256)
                imgui.PushItemWidth(585)
                imgui.InputInt('##������', delayvr1)
                if imgui.IsItemHovered() then
                    imgui.BeginTooltip()
                    imgui.Text(u8'���� �������� � ��������')
                    imgui.EndTooltip()
                end
                imgui.SameLine()
                imgui.SetCursorPos(imgui.ImVec2(5, 70))
                if imgui.BeginChild('Name##'..tab, imgui.ImVec2(600, 400), true) then
                    imgui.Text(u8"/vr 2 ����������")
                    if imgui.Button(u8"��������: "..tostring(vrpiar2), imgui.ImVec2(185, 20)) then vrpiar2 = not vrpiar2 end
                    imgui.SameLine()
                    imgui.InputTextWithHint(u8'##��� ������', u8'����� ����� � /vr', textvr2, 236)
                    imgui.PushItemWidth(585)
                    imgui.InputInt("##", delayvr2)
                    if imgui.IsItemHovered() then
                        imgui.BeginTooltip()
                        imgui.Text(u8'���� �������� � ��������')
                        imgui.EndTooltip()
                    end
                    imgui.SetCursorPos(imgui.ImVec2(1, 110))
                    if imgui.BeginChild('Name##'..tab, imgui.ImVec2(585, 100), true) then
                        imgui.Text(u8"/vr 3 ����������")
                        if imgui.Button(u8"��������: "..tostring(vrpiar3), imgui.ImVec2(185, 20)) then vrpiar3 = not vrpiar3 end
                        imgui.SameLine()
                        imgui.InputTextWithHint(u8'##��� ������', u8'����� ����� � /vr', textvr3, 256)
                        imgui.PushItemWidth(570)
                        imgui.InputInt(u8'##������', delayvr3)
                        if imgui.IsItemHovered() then
                            imgui.BeginTooltip()
                            imgui.Text(u8'���� �������� � ��������')
                            imgui.EndTooltip()
                        end
                        imgui.EndChild()
                    end
                    imgui.EndChild()
                end
            --==FB or RB piar
            elseif tab == 2 then
                if imgui.Button(u8"��������: "..tostring(fbpiar1), imgui.ImVec2(185, 20)) then fbpiar1 = not fbpiar1 end
                imgui.SameLine()
                imgui.InputTextWithHint(u8'##��� ������', u8'����� ����� � /fb', textfb1, 256)
                imgui.PushItemWidth(585)
                imgui.InputInt(u8'##������', delayfb1)
                if imgui.IsItemHovered() then
                    imgui.BeginTooltip()
                    imgui.Text(u8'���� �������� � ��������')
                    imgui.EndTooltip()
                end
                imgui.SameLine()
                imgui.SetCursorPos(imgui.ImVec2(5, 70))
                if imgui.BeginChild('Name##'..tab, imgui.ImVec2(600, 400), true) then
                    if imgui.Button(u8"��������: "..tostring(fbpiar2), imgui.ImVec2(185, 20)) then fbpiar2 = not fbpiar2 end
                    imgui.SameLine()
                    imgui.InputTextWithHint(u8'##��� ������', u8'����� ����� � /fb', textfb2, 236)
                    imgui.PushItemWidth(585)
                    imgui.InputInt(u8'##������', delayfb2)
                    if imgui.IsItemHovered() then
                        imgui.BeginTooltip()
                        imgui.Text(u8'���� �������� � ��������')
                        imgui.EndTooltip()
                    end
                    imgui.SetCursorPos(imgui.ImVec2(1, 110))
                    if imgui.BeginChild('Name##'..tab, imgui.ImVec2(585, 100), true) then
                        if imgui.Button(u8"��������: "..tostring(fbpiar3), imgui.ImVec2(185, 20)) then fbpiar3 = not fbpiar3 end
                        imgui.SameLine()
                        imgui.InputTextWithHint(u8'##��� ������', u8'����� ����� � /fb', textfb3, 256)
                        imgui.PushItemWidth(570)
                        imgui.InputInt(u8'##������', delayfb3)
                        if imgui.IsItemHovered() then
                            imgui.BeginTooltip()
                            imgui.Text(u8'���� �������� � ��������')
                            imgui.EndTooltip()
                        end
                        imgui.EndChild()
                    end
                    imgui.EndChild()
                end
            --==fam and al piar==--
            elseif tab == 3 then
                if imgui.Button(u8"��������: "..tostring(fampiar1), imgui.ImVec2(185, 20)) then fampiar1 = not fampiar1 end
                imgui.SameLine()
                imgui.InputTextWithHint(u8'##��� ������', u8'����� ����� � /fam', textfam1, 256)
                imgui.PushItemWidth(585)
                imgui.InputInt(u8'##������', delayfam1)
                if imgui.IsItemHovered() then
                    imgui.BeginTooltip()
                    imgui.Text(u8'���� �������� � ��������')
                    imgui.EndTooltip()
                end
                imgui.SameLine()
                imgui.SetCursorPos(imgui.ImVec2(5, 70))
                if imgui.BeginChild('Name##'..tab, imgui.ImVec2(600, 380), true) then
                    if imgui.Button(u8"��������: "..tostring(fampiar2), imgui.ImVec2(185, 20)) then fampiar2 = not fampiar2 end
                    imgui.SameLine()
                    imgui.InputTextWithHint(u8'##��� ������', u8'����� ����� � /fam', textfam2, 236)
                    imgui.PushItemWidth(585)
                    imgui.InputInt(u8'##������', delayfam2)
                    if imgui.IsItemHovered() then
                        imgui.BeginTooltip()
                        imgui.Text(u8'���� �������� � ��������')
                        imgui.EndTooltip()
                    end
                    imgui.SetCursorPos(imgui.ImVec2(1, 110))
                    if imgui.BeginChild('Name##'..tab, imgui.ImVec2(585, 100), true) then
                        if imgui.Button(u8"��������: "..tostring(fampiar3), imgui.ImVec2(185, 20)) then fampiar3 = not fampiar3 end
                        imgui.SameLine()
                        imgui.InputTextWithHint(u8'##��� ������', u8'����� ����� � /fam', textfam3, 256)
                        imgui.PushItemWidth(570)
                        imgui.InputInt(u8'##������', delayfam3)
                        if imgui.IsItemHovered() then
                            imgui.BeginTooltip()
                            imgui.Text(u8'���� �������� � ��������')
                            imgui.EndTooltip()
                        end
                        imgui.EndChild()
                    end
                    imgui.EndChild()
                end
                if imgui.Button(u8"���� 1 ������ � /al: "..tostring(alpiar), imgui.ImVec2(192, 25)) then alpiar = not alpiar end
                imgui.SameLine()
                if imgui.Button(u8"���� 2 ������ � /al: "..tostring(alpiar2), imgui.ImVec2(192, 25)) then alpiar2 = not alpiar2 end
                imgui.SameLine()
                if imgui.Button(u8"���� 3 ������ � /al: "..tostring(alpiar3), imgui.ImVec2(192, 25)) then alpiar3 = not alpiar3 end
            elseif tab == 4 then
                if imgui.Combo(u8'����',colorListNumber,colorListBuffer, #colorList) then
                    theme[colorListNumber[0]+1].change()
                    ini.themes.number = colorListNumber[0]
                    inicfg.save(ini, ininame)
                end
                if imgui.CollapsingHeader(u8'�������� ���������') then
                    imgui.Text(u8"�������� ����� ������ � ������ ����������")
                    imgui.SliderInt(u8'##������', delaytwofb, 1, 650)
                    imgui.Separator()
                end
                if imgui.CollapsingHeader(u8'��������� ����� � ��') then
                    imgui.InputTextWithHint(u8'##��� ������', u8'����� ����� � /ad', textad, 256)
                    imgui.SameLine()
                    if imgui.Button("sf") then
                        sfpiar = not sfpiar
                        notf.addNotification(string.format(sfpiar and "[Autopiar] ���� � ����� �� �������!!\n�� ����� ���������: "..addelay[0].." ���" or "[Autopiar] ���� � ����� �� ��������!"), 3)
                    end
                    imgui.SameLine()
                    if imgui.Button("lv") then
                        lvpiar = not lvpiar
                        notf.addNotification(string.format(lvpiar and "[Autopiar] ���� � ����� �� �������!!\n�� ����� ���������: "..addelay[0].." ���" or "[Autopiar] ���� � ����� �� ��������!"), 3)
                    end
                    imgui.SameLine()
                    if imgui.Button("ls") then
                        lspiar = not lspiar
                        notf.addNotification(string.format(lspiar and "[Autopiar] ���� � ����� �� �������!\n�� ����� ���������: "..addelay[0].." ���" or "[Autopiar] ���� � ����� �� ��������!"), 3)
                    end
                    imgui.SameLine()
                    if imgui.Button("biz") then
                        bis = not bis
                        notf.addNotification(string.format(bis and "[Autopiar] ���� ���� �������!\n�� ����� ���������: "..addelay[0].." ���" or "[Autopiar] ���� ���� ��������!"), 3)
                    end
                    imgui.SameLine()
                    imgui.PushItemWidth(70)
                    imgui.InputInt("##f", addelay)
                    if imgui.IsItemHovered() then
                        imgui.BeginTooltip()
                        imgui.Text(u8'���� �������� � ��������')
                        imgui.EndTooltip()
                    end
                    
                    imgui.Separator()
                end
                imgui.SetCursorPos(imgui.ImVec2(5, 430))
                if imgui.Button(u8'save', imgui.ImVec2(590, 50)) then
                    ini.vrtext.vrt1 = u8:decode(ffi.string(inputField))
                    ini.vrtext.vrt2 = u8:decode(ffi.string(textvr2))
                    ini.vrtext.vrt3 = u8:decode(ffi.string(textvr3))
                    ini.fbtext.fbt1 = u8:decode(ffi.string(textfb1))
                    ini.fbtext.fbt2 = u8:decode(ffi.string(textfb2))
                    ini.fbtext.fbt3 = u8:decode(ffi.string(textfb3))
                    ini.famtext.famt1 = u8:decode(ffi.string(textfam1))
                    ini.famtext.famt2 = u8:decode(ffi.string(textfam2))
                    ini.famtext.famt3 = u8:decode(ffi.string(textfam3))
                    ini.adtext.adt = u8:decode(ffi.string(textad))
                    notf.addNotification(string.format("[Autopiar] ��������� �������!!!!!!!!!"), 10)
                    inicfg.save(ini, ininame)
                end
            end
            imgui.EndChild()
        end
        imgui.End()
    end)


function main()
    sampRegisterChatCommand('piar', function() WinState[0] = not WinState[0] end) -- ������� �� ������� ����� ���������� ���� ����
    --==VR PIAR==--
    lua_thread.create(function()
        while true do
            wait(0)
            if vrpiar and inputField[0] ~= 0 then
                textPPP = u8:decode(ffi.string(inputField))
                sampSendChat("/vr "..textPPP)
                if vrpiar2 or vrpiar3 then
                    wait(delaytwofb[0]*1000)
                else
                    wait(delayvr1[0]*1000)
                end
            elseif vrpiar then
                vrpiar = false
                sampAddChatMessage("������� ����� � �����", -1)
            end
            if vrpiar3 and textvr3[0] ~= 0 then
                textx = u8:decode(ffi.string(textvr3))
                sampSendChat("/vr "..textx)
                wait(delayvr3[0]*1000)
            elseif vrpiar3 then
                vrpiar3 = false
                sampAddChatMessage("������� ����� � �����", -1)
            end
            if vrpiar2 and textvr2[0] ~= 0 then
                texts = u8:decode(ffi.string(textvr2))
                sampSendChat("/vr "..texts)
                wait(delayvr2[0]*1000)
            elseif vrpiar2 then
                vrpiar2 = false
                sampAddChatMessage("������� ����� � �����", -1)
            end
        end
    end)
    --==FBPIAR==--
    lua_thread.create(function()
        while true do
            wait(0)
            if fbpiar1 and textfb1[0] ~= 0 then
                textF = u8:decode(ffi.string(textfb1))
                sampSendChat("/fb "..textF)
                wait(1000)
                sampSendChat("/rb "..textF)
                if fbpiar2 or fbpiar3 then
                    wait(delaytwofb[0]*1000)
                else
                    wait(delayfb1[0]*1000)
                end
            elseif fbpiar1 then
                fbpiar1 = false
                sampAddChatMessage("������� ����� � �����", -1)
            end
            if fbpiar2 and textfb2[0] ~= 0 then
                textP = u8:decode(ffi.string(textfb2))
                sampSendChat("/fb "..textP)
                wait(1000)
                sampSendChat("/rb "..textP)
                wait(delayfb2[0]*1000)
            elseif fbpiar2 then
                fbpiar2 = false
                sampAddChatMessage("������� ����� � �����", -1)
            end
            if fbpiar3 and textfb3[0] ~= 0 then
                textXX = u8:decode(ffi.string(textfb3))
                sampSendChat("/fb "..textXX)
                wait(1000)
                sampSendChat("/rb "..textXX)
                wait(delayfb3[0]*1000)
            elseif fbpiar3 then
                fbpiar3 = false
                sampAddChatMessage("������� ����� � �����", -1)
            end
        end
    end)
    --==fampiar==--
    lua_thread.create(function()
        while true do
            wait(0)
            if fampiar1 and textfam1[0] ~= 0 then
                textFF = u8:decode(ffi.string(textfam1))
                sampSendChat("/fam "..textFF)
                if fampiar2 or fampiar3 then
                    wait(delaytwofb[0]*1000)
                else
                    wait(delayfam1[0]*1000)
                end
            elseif fampiar1 then
                fampiar1 = false
                sampAddChatMessage("������� ����� � �����", -1)
            end
            if fampiar2 and textfam2[0] ~= 0 then
                textPP = u8:decode(ffi.string(textfam2))
                sampSendChat("/fam "..textPP)
                wait(delayfam2[0]*1000)
            elseif fampiar2 then
                fampiar2 = false
                sampAddChatMessage("������� ����� � �����", -1)
            end
            if fampiar3 and textfam3[0] ~= 0 then
                textXXX = u8:decode(ffi.string(textfam3))
                sampSendChat("/fam "..textXXX)
                wait(delayfam3[0]*1000)
            elseif fampiar3 then
                fampiar3 = false
                sampAddChatMessage("������� ����� � �����", -1)
            end
        end
    end)
    --==alpiar==--
    lua_thread.create(function()
        while true do
            wait(0)
            if alpiar and textfam1[0] ~= 0 then
                textFFF = u8:decode(ffi.string(textfam1))
                sampSendChat("/al "..textFFF)
                if alpiar2 or alpiar3 then
                    wait(delaytwofb[0]*1000)
                else
                    wait(delayfam1[0]*1000)
                end
            elseif alpiar then
                alpiar1= false
                sampAddChatMessage("������� ����� � �����", -1)
            end
            if alpiar2 and textfam2[0] ~= 0 then
                textFFFF = u8:decode(ffi.string(textfam2))
                sampSendChat("/al "..textFFFF)
                wait(delayfam2[0]*1000)
            elseif alpiar2 then
                alpiar2 = false
                sampAddChatMessage("������� ����� � �����", -1)
            end
            if alpiar3 and textfam3[0] ~= 0 then
                textFFFFF = u8:decode(ffi.string(textfam3))
                sampSendChat("/al "..textFFFFF)
                wait(delayfam3[0]*1000)
            elseif alpiar3 then
                alpiar3 = false
                sampAddChatMessage("������� ����� � �����", -1)
            end
        end
    end)
    --==adpiar==--
    lua_thread.create(function()
        while true do
            wait(0)
            if sfpiar or lspiar or lvpiar then
                textXXXX = u8:decode(ffi.string(textad))
                sampSendChat("/ad "..textXXXX)
                wait(addelay[0]*1000)
            end
        end
    end)
    wait(-1)
end

 
imgui.OnInitialize(function()
    decor()
    if ini.themes.number == 0 then
        theme[1].change()
    elseif ini.themes.number == 1 then
        theme[2].change()
    elseif ini.themes.number == 2 then
        theme[3].change()
    elseif ini.themes.number == 3 then
        theme[4].change()
    end
    imgui.GetIO().IniFilename = nil
    local config = imgui.ImFontConfig()
    config.MergeMode = true
    config.PixelSnapH = true
    iconRanges = imgui.new.ImWchar[3](faicons.min_range, faicons.max_range, 0)
    imgui.GetIO().Fonts:AddFontFromMemoryCompressedBase85TTF(faicons.get_font_data_base85('solid'), 14, config, iconRanges)
  end)
 
  function decor()
      imgui.SwitchContext()
      local style = imgui.GetStyle()
      local colors = style.Colors
      local clr = imgui.Col
      local ImVec4 = imgui.ImVec4
 
      -->> Sizez
      imgui.GetStyle().WindowPadding = imgui.ImVec2(4, 4)
      imgui.GetStyle().FramePadding = imgui.ImVec2(4, 3)
      imgui.GetStyle().ItemSpacing = imgui.ImVec2(8, 4)
      imgui.GetStyle().ItemInnerSpacing = imgui.ImVec2(4, 4)
      imgui.GetStyle().TouchExtraPadding = imgui.ImVec2(0, 0)
 
      imgui.GetStyle().IndentSpacing = 21
      imgui.GetStyle().ScrollbarSize = 14
      imgui.GetStyle().GrabMinSize = 10
 
      imgui.GetStyle().WindowBorderSize = 0
      imgui.GetStyle().ChildBorderSize = 1
      imgui.GetStyle().PopupBorderSize = 1
      imgui.GetStyle().FrameBorderSize = 1
      imgui.GetStyle().TabBorderSize = 0
 
      imgui.GetStyle().WindowRounding = 5
      imgui.GetStyle().ChildRounding = 5
      imgui.GetStyle().PopupRounding = 5
      imgui.GetStyle().FrameRounding = 5
      imgui.GetStyle().ScrollbarRounding = 2.5
      imgui.GetStyle().GrabRounding = 5
      imgui.GetStyle().TabRounding = 5
      imgui.GetStyle().WindowTitleAlign = imgui.ImVec2(0.50, 0.50)
 

  end
 

SeregaIvanovis

Активный
118
33
что самое вырезать?
Весь твой код:
--==libs==--
require 'lib.moonloader'
local imgui = require 'mimgui' -- ���������� ���������� ������
local encoding = require 'encoding' -- ���������� ���������� ��� ������ � ������� �����������
encoding.default = 'CP1251' -- ����� ��������� �� ���������
local u8 = encoding.UTF8
local ffi = require 'ffi'
local sampev = require 'lib.samp.events'
local new = imgui.new
local faicons = require('fAwesome6')
local inicfg = require("inicfg")
local notf = import 'imgui_notf.lua'
local colorList = {u8'�������', u8'������',u8'�����', u8'����������'}
local colorListNumber = new.int()
local colorListBuffer = new['const char*'][#colorList](colorList)
--==locals==--
local ininame = ("autopiaar.ini")
local ini = inicfg.load(inicfg.load({
    themes = {
        number = 3
    },
    vrtext = {
        vrt1 = '',
        vrt2 = '',
        vrt3 = ''
    },
    fbtext = {
        fbt1 = '',
        fbt2 = '',
        fbt3 = ''
    },
    famtext = {
        famt1 = '',
        famt2 = '',
        famt3 = ''
    },
    adtext = {
        adt = '',
    },
}, ininame))
inicfg.save(ini, ininame)

--==ints==--
local delayvr1 = new.int(10)
local delayvr2 = new.int(1)
local delayvr3 = new.int(1)
local delayfb1 = new.int(10)
local delayfb2 = new.int(10)
local delayfb3 = new.int(10)
local delaytwovr = new.int(10)
local delaytwofb = new.int(10)
local tab = 1
local delayfam1 = new.int(10)
local delayfam2 = new.int(10)
local delayfam3 = new.int(10)
local addelay = new.int(30)
--==chars==--
local textvr2 = new.char[236](u8(ini.vrtext.vrt2))
local textvr3 = new.char[256](u8(ini.vrtext.vrt3))
local inputField = new.char[256](u8(ini.vrtext.vrt1))
local textfam1 = new.char[256](u8(ini.famtext.famt1))
local textfam2 = new.char[256](u8(ini.famtext.famt2))
local textfam3 = new.char[256](u8(ini.famtext.famt3))
local textfb1 = new.char[256](u8(ini.fbtext.fbt1))
local textfb2 = new.char[256](u8(ini.fbtext.fbt2))
local textfb3 = new.char[256](u8(ini.fbtext.fbt3))
local textad = new.char[256](u8(ini.adtext.adt))
--==bool==--
local vrpiar = false
local vrpiar2 = false
local vrpiar3 = false
local fbpiar1 = false
local fbpiar2 = false
local fbpiar3 = false
local fampiar1 = false
local fampiar2 = false
local fampiar3 = false
local WinState = new.bool()
local vrdialog = new.bool()
local showid = new.bool()
local sfradio = new.bool()
local lvradio = new.bool()
local lsradio = new.bool()
local bspiar = new.bool()
local sfpiar = false
local lvpiar = false
local lspiar = false
local enable_autoupdate = true
local autoupdate_loaded = false
local Update = nil
local bis = false
local alpiar = false
local alpiar2 = false
local alpiar3 = false
--==theme==--
theme = {
    {
        change = function()
            local ImVec4 = imgui.ImVec4
            imgui.SwitchContext()
            imgui.GetStyle().Colors[imgui.Col.Text]                   = ImVec4(1.00, 1.00, 1.00, 1.00)
            imgui.GetStyle().Colors[imgui.Col.TextDisabled]           = ImVec4(0.50, 0.50, 0.50, 1.00)
            imgui.GetStyle().Colors[imgui.Col.WindowBg]               = ImVec4(0.06, 0.06, 0.06, 0.94)
            imgui.GetStyle().Colors[imgui.Col.ChildBg]                = ImVec4(1.00, 1.00, 1.00, 0.00)
            imgui.GetStyle().Colors[imgui.Col.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94)
            imgui.GetStyle().Colors[imgui.Col.Border]                 = ImVec4(0.43, 0.43, 0.50, 0.50)
            imgui.GetStyle().Colors[imgui.Col.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
            imgui.GetStyle().Colors[imgui.Col.FrameBg]                = ImVec4(0.48, 0.16, 0.16, 0.54)
            imgui.GetStyle().Colors[imgui.Col.FrameBgHovered]         = ImVec4(0.98, 0.26, 0.26, 0.40)
            imgui.GetStyle().Colors[imgui.Col.FrameBgActive]          = ImVec4(0.98, 0.26, 0.26, 0.67)
            imgui.GetStyle().Colors[imgui.Col.TitleBg]                = ImVec4(0.04, 0.04, 0.04, 1.00)
            imgui.GetStyle().Colors[imgui.Col.TitleBgActive]          = ImVec4(0.48, 0.16, 0.16, 1.00)
            imgui.GetStyle().Colors[imgui.Col.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51)
            imgui.GetStyle().Colors[imgui.Col.MenuBarBg]              = ImVec4(0.14, 0.14, 0.14, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
            imgui.GetStyle().Colors[imgui.Col.ScrollbarGrab]          = ImVec4(0.31, 0.31, 0.31, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
            imgui.GetStyle().Colors[imgui.Col.CheckMark]              = ImVec4(0.98, 0.26, 0.26, 1.00)
            imgui.GetStyle().Colors[imgui.Col.SliderGrab]             = ImVec4(0.88, 0.26, 0.24, 1.00)
            imgui.GetStyle().Colors[imgui.Col.SliderGrabActive]       = ImVec4(0.98, 0.26, 0.26, 1.00)
            imgui.GetStyle().Colors[imgui.Col.Button]                 = ImVec4(0.98, 0.26, 0.26, 0.40)
            imgui.GetStyle().Colors[imgui.Col.ButtonHovered]          = ImVec4(0.98, 0.26, 0.26, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ButtonActive]           = ImVec4(0.98, 0.06, 0.06, 1.00)
            imgui.GetStyle().Colors[imgui.Col.Header]                 = ImVec4(0.98, 0.26, 0.26, 0.31)
            imgui.GetStyle().Colors[imgui.Col.HeaderHovered]          = ImVec4(0.98, 0.26, 0.26, 0.80)
            imgui.GetStyle().Colors[imgui.Col.HeaderActive]           = ImVec4(0.98, 0.26, 0.26, 1.00)
            imgui.GetStyle().Colors[imgui.Col.Separator]              = ImVec4(0.43, 0.43, 0.50, 0.50)
            imgui.GetStyle().Colors[imgui.Col.SeparatorHovered]       = ImVec4(0.75, 0.10, 0.10, 0.78)
            imgui.GetStyle().Colors[imgui.Col.SeparatorActive]        = ImVec4(0.75, 0.10, 0.10, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ResizeGrip]             = ImVec4(0.98, 0.26, 0.26, 0.25)
            imgui.GetStyle().Colors[imgui.Col.ResizeGripHovered]      = ImVec4(0.98, 0.26, 0.26, 0.67)
            imgui.GetStyle().Colors[imgui.Col.ResizeGripActive]       = ImVec4(0.98, 0.26, 0.26, 0.95)
            imgui.GetStyle().Colors[imgui.Col.Tab]                    = ImVec4(0.98, 0.26, 0.26, 0.40)
            imgui.GetStyle().Colors[imgui.Col.TabHovered]             = ImVec4(0.98, 0.26, 0.26, 1.00)
            imgui.GetStyle().Colors[imgui.Col.TabActive]              = ImVec4(0.98, 0.06, 0.06, 1.00)
            imgui.GetStyle().Colors[imgui.Col.TabUnfocused]           = ImVec4(0.98, 0.26, 0.26, 1.00)
            imgui.GetStyle().Colors[imgui.Col.TabUnfocusedActive]     = ImVec4(0.98, 0.26, 0.26, 1.00)
            imgui.GetStyle().Colors[imgui.Col.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00)
            imgui.GetStyle().Colors[imgui.Col.PlotLinesHovered]       = ImVec4(1.00, 0.43, 0.35, 1.00)
            imgui.GetStyle().Colors[imgui.Col.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
            imgui.GetStyle().Colors[imgui.Col.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
            imgui.GetStyle().Colors[imgui.Col.TextSelectedBg]         = ImVec4(0.98, 0.26, 0.26, 0.35)
        end
    },
    {
        change = function()
            local ImVec4 = imgui.ImVec4
            imgui.SwitchContext()
            imgui.GetStyle().Colors[imgui.Col.Text]                   = ImVec4(0.90, 0.90, 0.90, 1.00)
            imgui.GetStyle().Colors[imgui.Col.TextDisabled]           = ImVec4(0.60, 0.60, 0.60, 1.00)
            imgui.GetStyle().Colors[imgui.Col.WindowBg]               = ImVec4(0.08, 0.08, 0.08, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ChildBg]                = ImVec4(0.10, 0.10, 0.10, 1.00)
            imgui.GetStyle().Colors[imgui.Col.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 1.00)
            imgui.GetStyle().Colors[imgui.Col.Border]                 = ImVec4(0.70, 0.70, 0.70, 0.40)
            imgui.GetStyle().Colors[imgui.Col.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
            imgui.GetStyle().Colors[imgui.Col.FrameBg]                = ImVec4(0.15, 0.15, 0.15, 1.00)
            imgui.GetStyle().Colors[imgui.Col.FrameBgHovered]         = ImVec4(0.19, 0.19, 0.19, 0.71)
            imgui.GetStyle().Colors[imgui.Col.FrameBgActive]          = ImVec4(0.34, 0.34, 0.34, 0.79)
            imgui.GetStyle().Colors[imgui.Col.TitleBg]                = ImVec4(0.00, 0.69, 0.33, 0.80)
            imgui.GetStyle().Colors[imgui.Col.TitleBgActive]          = ImVec4(0.00, 0.74, 0.36, 1.00)
            imgui.GetStyle().Colors[imgui.Col.TitleBgCollapsed]       = ImVec4(0.00, 0.69, 0.33, 0.50)
            imgui.GetStyle().Colors[imgui.Col.MenuBarBg]              = ImVec4(0.00, 0.80, 0.38, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ScrollbarBg]            = ImVec4(0.16, 0.16, 0.16, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ScrollbarGrab]          = ImVec4(0.00, 0.69, 0.33, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ScrollbarGrabHovered]   = ImVec4(0.00, 0.82, 0.39, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ScrollbarGrabActive]    = ImVec4(0.00, 1.00, 0.48, 1.00)
            imgui.GetStyle().Colors[imgui.Col.CheckMark]              = ImVec4(0.00, 0.69, 0.33, 1.00)
            imgui.GetStyle().Colors[imgui.Col.SliderGrab]             = ImVec4(0.00, 0.69, 0.33, 1.00)
            imgui.GetStyle().Colors[imgui.Col.SliderGrabActive]       = ImVec4(0.00, 0.77, 0.37, 1.00)
            imgui.GetStyle().Colors[imgui.Col.Button]                 = ImVec4(0.00, 0.69, 0.33, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ButtonHovered]          = ImVec4(0.00, 0.82, 0.39, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ButtonActive]           = ImVec4(0.00, 0.87, 0.42, 1.00)
            imgui.GetStyle().Colors[imgui.Col.Header]                 = ImVec4(0.00, 0.69, 0.33, 1.00)
            imgui.GetStyle().Colors[imgui.Col.HeaderHovered]          = ImVec4(0.00, 0.76, 0.37, 0.57)
            imgui.GetStyle().Colors[imgui.Col.HeaderActive]           = ImVec4(0.00, 0.88, 0.42, 0.89)
            imgui.GetStyle().Colors[imgui.Col.Separator]              = ImVec4(1.00, 1.00, 1.00, 0.40)
            imgui.GetStyle().Colors[imgui.Col.SeparatorHovered]       = ImVec4(1.00, 1.00, 1.00, 0.60)
            imgui.GetStyle().Colors[imgui.Col.SeparatorActive]        = ImVec4(1.00, 1.00, 1.00, 0.80)
            imgui.GetStyle().Colors[imgui.Col.ResizeGrip]             = ImVec4(0.00, 0.69, 0.33, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ResizeGripHovered]      = ImVec4(0.00, 0.76, 0.37, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ResizeGripActive]       = ImVec4(0.00, 0.86, 0.41, 1.00)
            imgui.GetStyle().Colors[imgui.Col.PlotLines]              = ImVec4(0.00, 0.69, 0.33, 1.00)
            imgui.GetStyle().Colors[imgui.Col.PlotLinesHovered]       = ImVec4(0.00, 0.74, 0.36, 1.00)
            imgui.GetStyle().Colors[imgui.Col.PlotHistogram]          = ImVec4(0.00, 0.69, 0.33, 1.00)
            imgui.GetStyle().Colors[imgui.Col.PlotHistogramHovered]   = ImVec4(0.00, 0.80, 0.38, 1.00)
            imgui.GetStyle().Colors[imgui.Col.TextSelectedBg]         = ImVec4(0.00, 0.69, 0.33, 0.72)
        end
    },
    {
        change = function()
            local ImVec4 = imgui.ImVec4
           
            imgui.SwitchContext()
            imgui.GetStyle().Colors[imgui.Col.WindowBg]               = ImVec4(0.08, 0.08, 0.08, 1.00)
            imgui.GetStyle().Colors[imgui.Col.FrameBg]                = ImVec4(0.16, 0.29, 0.48, 0.54)
            imgui.GetStyle().Colors[imgui.Col.FrameBgHovered]         = ImVec4(0.26, 0.59, 0.98, 0.40)
            imgui.GetStyle().Colors[imgui.Col.FrameBgActive]          = ImVec4(0.26, 0.59, 0.98, 0.67)
            imgui.GetStyle().Colors[imgui.Col.TitleBg]                = ImVec4(0.04, 0.04, 0.04, 1.00)
            imgui.GetStyle().Colors[imgui.Col.TitleBgActive]          = ImVec4(0.16, 0.29, 0.48, 1.00)
            imgui.GetStyle().Colors[imgui.Col.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51)
            imgui.GetStyle().Colors[imgui.Col.CheckMark]              = ImVec4(0.26, 0.59, 0.98, 1.00)
            imgui.GetStyle().Colors[imgui.Col.SliderGrab]             = ImVec4(0.24, 0.52, 0.88, 1.00)
            imgui.GetStyle().Colors[imgui.Col.SliderGrabActive]       = ImVec4(0.26, 0.59, 0.98, 1.00)
            imgui.GetStyle().Colors[imgui.Col.Button]                 = ImVec4(0.26, 0.59, 0.98, 0.40)
            imgui.GetStyle().Colors[imgui.Col.ButtonHovered]          = ImVec4(0.26, 0.59, 0.98, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ButtonActive]           = ImVec4(0.06, 0.53, 0.98, 1.00)
            imgui.GetStyle().Colors[imgui.Col.Header]                 = ImVec4(0.26, 0.59, 0.98, 0.31)
            imgui.GetStyle().Colors[imgui.Col.HeaderHovered]          = ImVec4(0.26, 0.59, 0.98, 0.80)
            imgui.GetStyle().Colors[imgui.Col.HeaderActive]           = ImVec4(0.26, 0.59, 0.98, 1.00)
            imgui.GetStyle().Colors[imgui.Col.Separator]              = ImVec4(0.43, 0.43, 0.50, 0.50)
            imgui.GetStyle().Colors[imgui.Col.SeparatorHovered]       = ImVec4(0.26, 0.59, 0.98, 0.78)
            imgui.GetStyle().Colors[imgui.Col.SeparatorActive]        = ImVec4(0.26, 0.59, 0.98, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ResizeGrip]             = ImVec4(0.26, 0.59, 0.98, 0.25)
            imgui.GetStyle().Colors[imgui.Col.ResizeGripHovered]      = ImVec4(0.26, 0.59, 0.98, 0.67)
            imgui.GetStyle().Colors[imgui.Col.ResizeGripActive]       = ImVec4(0.26, 0.59, 0.98, 0.95)
            imgui.GetStyle().Colors[imgui.Col.TextSelectedBg]         = ImVec4(0.26, 0.59, 0.98, 0.35)
            imgui.GetStyle().Colors[imgui.Col.Text]                   = ImVec4(1.00, 1.00, 1.00, 1.00)
            imgui.GetStyle().Colors[imgui.Col.TextDisabled]           = ImVec4(0.50, 0.50, 0.50, 1.00)
            imgui.GetStyle().Colors[imgui.Col.WindowBg]               = ImVec4(0.06, 0.53, 0.98, 0.70)
            imgui.GetStyle().Colors[imgui.Col.ChildBg]                = ImVec4(0.10, 0.10, 0.10, 1.00)
            imgui.GetStyle().Colors[imgui.Col.PopupBg]                = ImVec4(0.06, 0.53, 0.98, 0.70)
            imgui.GetStyle().Colors[imgui.Col.Border]                 = ImVec4(0.43, 0.43, 0.50, 0.50)
            imgui.GetStyle().Colors[imgui.Col.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
            imgui.GetStyle().Colors[imgui.Col.MenuBarBg]              = ImVec4(0.14, 0.14, 0.14, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
            imgui.GetStyle().Colors[imgui.Col.ScrollbarGrab]          = ImVec4(0.31, 0.31, 0.31, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
            imgui.GetStyle().Colors[imgui.Col.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
            imgui.GetStyle().Colors[imgui.Col.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00)
            imgui.GetStyle().Colors[imgui.Col.PlotLinesHovered]       = ImVec4(1.00, 0.43, 0.35, 1.00)
            imgui.GetStyle().Colors[imgui.Col.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
            imgui.GetStyle().Colors[imgui.Col.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
        end
    },
    {
        change = function()
            imgui.SwitchContext()
            local style = imgui.GetStyle()
            local colors = style.Colors
            local clr = imgui.Col
            local ImVec4 = imgui.ImVec4
            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.15, 0.16, 0.37, 1.00)
            colors[clr.ChildBg]                = ImVec4(0.17, 0.18, 0.43, 1.00)
            colors[clr.PopupBg]                = colors[clr.WindowBg]

            colors[clr.Border]                 = ImVec4(0.33, 0.34, 0.62, 1.00)
            colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)

            colors[clr.TitleBg]                = ImVec4(0.18, 0.20, 0.46, 1.00)
            colors[clr.TitleBgActive]          = ImVec4(0.18, 0.20, 0.46, 1.00)
            colors[clr.TitleBgCollapsed]       = ImVec4(0.18, 0.20, 0.46, 1.00)
            colors[clr.MenuBarBg]              = colors[clr.ChildBg]

            colors[clr.ScrollbarBg]            = ImVec4(0.14, 0.14, 0.36, 1.00)
            colors[clr.ScrollbarGrab]          = ImVec4(0.22, 0.22, 0.53, 1.00)
            colors[clr.ScrollbarGrabHovered]   = ImVec4(0.20, 0.21, 0.53, 1.00)
            colors[clr.ScrollbarGrabActive]    = ImVec4(0.25, 0.25, 0.58, 1.00)

            colors[clr.Button]                 = ImVec4(0.25, 0.25, 0.58, 1.00)
            colors[clr.ButtonHovered]          = ImVec4(0.23, 0.23, 0.55, 1.00)
            colors[clr.ButtonActive]           = ImVec4(0.27, 0.27, 0.62, 1.00)

            colors[clr.CheckMark]              = ImVec4(0.39, 0.39, 0.83, 1.00)
            colors[clr.SliderGrab]             = ImVec4(0.39, 0.39, 0.83, 1.00)
            colors[clr.SliderGrabActive]       = ImVec4(0.48, 0.48, 0.96, 1.00)

            colors[clr.FrameBg]                = colors[clr.Button]
            colors[clr.FrameBgHovered]         = colors[clr.ButtonHovered]
            colors[clr.FrameBgActive]          = colors[clr.ButtonActive]

            colors[clr.Header]                 = colors[clr.Button]
            colors[clr.HeaderHovered]          = colors[clr.ButtonHovered]
            colors[clr.HeaderActive]           = colors[clr.ButtonActive]

            colors[clr.Separator]              = ImVec4(0.43, 0.43, 0.50, 0.50)
            colors[clr.SeparatorHovered]       = colors[clr.SliderGrabActive]
            colors[clr.SeparatorActive]        = colors[clr.SliderGrabActive]

            colors[clr.ResizeGrip]             = colors[clr.Button]
            colors[clr.ResizeGripHovered]      = colors[clr.ButtonHovered]
            colors[clr.ResizeGripActive]       = colors[clr.ButtonActive]

            colors[clr.Tab]                    = colors[clr.Button]
            colors[clr.TabHovered]             = colors[clr.ButtonHovered]
            colors[clr.TabActive]              = colors[clr.ButtonActive]
            colors[clr.TabUnfocused]           = colors[clr.Button]
            colors[clr.TabUnfocusedActive]     = colors[clr.Button]

            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.TextSelectedBg]         = ImVec4(0.33, 0.33, 0.57, 1.00)
            colors[clr.DragDropTarget]         = ImVec4(1.00, 1.00, 0.00, 0.90)

            colors[clr.NavHighlight]           = ImVec4(0.26, 0.59, 0.98, 1.00)
            colors[clr.NavWindowingHighlight]  = ImVec4(1.00, 1.00, 1.00, 0.70)
            colors[clr.NavWindowingDimBg]      = ImVec4(0.80, 0.80, 0.80, 0.20)

            colors[clr.ModalWindowDimBg]       = ImVec4(0.00, 0.00, 0.00, 0.90)
        end
    },
}

--==main==--
function sampev.onShowDialog(dialogId, style, title, button1, button2, textxxxx)
    if vrpiar or vrpiar2 or vrpiar3 then
        if textxxxx:find("���� ��������� �������� ��������") and button1 == "��" and not sampIsCursorActive() then
            sampSendDialogResponse(dialogId, 1, -1, -1)
            return false
        end
    end
    if button1 == "��������" then
        return false
    end
    if lspiar or lvpiar or sfpiar then
        if lspiar then
            sampSendDialogResponse(25476, 1, 0, -1)
            if bis then
                sampSendDialogResponse(15346, 1, 3, -1)
            else
                sampSendDialogResponse(15346, 1, 0, -1)
            end
            sampSendDialogResponse(15347, 1, -1, -1)
        end
        if lvpiar then
            sampSendDialogResponse(25476, 1, 1, -1)
            if bis then
                sampSendDialogResponse(15346, 1, 3, -1)
            else
                sampSendDialogResponse(15346, 1, 0, -1)
            end
            sampSendDialogResponse(15347, 1, -1, -1)
        end
        if sfpiar then
            sampSendDialogResponse(25476, 1, 2, -1)
            if bis then
                sampSendDialogResponse(15346, 1, 3, -1)
            else
                sampSendDialogResponse(15346, 1, 0, -1)
            end
            sampSendDialogResponse(15347, 1, -1, -1)
        end
        if dialogId == 25476 or dialogId == 15346 or dialogId == 15347 then
            return false
        end
       
       
    end
    return true
end
imgui.OnFrame(function() return WinState[0] end,
    function(player)
        imgui.SetNextWindowPos(imgui.ImVec2(500,500), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5)) -- �������� �� ��������� ���� �� ������
        imgui.SetNextWindowSize(imgui.ImVec2(840, 545), imgui.Cond.Always) -- �������� �� ������ ����
        imgui.Begin(u8'��������', WinState, imgui.WindowFlags.NoResize) -- �������� �� ����������� ����, ��� ��������� � �����
        if imgui.Button(u8' ���� � /vr', imgui.ImVec2(200, 125)) then tab = 1 end
        if imgui.Button(faicons("gun")..u8' ���� � /fb|/rb', imgui.ImVec2(200, 125)) then tab = 2 end
        if imgui.Button(faicons("person")..u8' ���� � /fam|/al', imgui.ImVec2(200, 125)) then tab = 3 end
        if imgui.Button(faicons('gear')..u8' ���������', imgui.ImVec2(200, 125)) then tab = 4 end
        imgui.SetCursorPos(imgui.ImVec2(220, 30))
        if imgui.BeginChild('Name##'..tab, imgui.ImVec2(600, 490), true) then
            --==vrpiar==--
            if tab == 1 then
                imgui.Text(u8"/vr 1 ����������")
                if imgui.Button(u8"��������: "..tostring(vrpiar), imgui.ImVec2(185, 20)) then vrpiar = not vrpiar end
                imgui.SameLine()
                imgui.InputTextWithHint(u8'##��� ������', u8'����� ����� � /vr', inputField, 256)
                imgui.PushItemWidth(585)
                imgui.InputInt('##������', delayvr1)
                if imgui.IsItemHovered() then
                    imgui.BeginTooltip()
                    imgui.Text(u8'���� �������� � ��������')
                    imgui.EndTooltip()
                end
                imgui.SameLine()
                imgui.SetCursorPos(imgui.ImVec2(5, 70))
                if imgui.BeginChild('Name##'..tab, imgui.ImVec2(600, 400), true) then
                    imgui.Text(u8"/vr 2 ����������")
                    if imgui.Button(u8"��������: "..tostring(vrpiar2), imgui.ImVec2(185, 20)) then vrpiar2 = not vrpiar2 end
                    imgui.SameLine()
                    imgui.InputTextWithHint(u8'##��� ������', u8'����� ����� � /vr', textvr2, 236)
                    imgui.PushItemWidth(585)
                    imgui.InputInt("##", delayvr2)
                    if imgui.IsItemHovered() then
                        imgui.BeginTooltip()
                        imgui.Text(u8'���� �������� � ��������')
                        imgui.EndTooltip()
                    end
                    imgui.SetCursorPos(imgui.ImVec2(1, 110))
                    if imgui.BeginChild('Name##'..tab, imgui.ImVec2(585, 100), true) then
                        imgui.Text(u8"/vr 3 ����������")
                        if imgui.Button(u8"��������: "..tostring(vrpiar3), imgui.ImVec2(185, 20)) then vrpiar3 = not vrpiar3 end
                        imgui.SameLine()
                        imgui.InputTextWithHint(u8'##��� ������', u8'����� ����� � /vr', textvr3, 256)
                        imgui.PushItemWidth(570)
                        imgui.InputInt(u8'##������', delayvr3)
                        if imgui.IsItemHovered() then
                            imgui.BeginTooltip()
                            imgui.Text(u8'���� �������� � ��������')
                            imgui.EndTooltip()
                        end
                        imgui.EndChild()
                    end
                    imgui.EndChild()
                end
            --==FB or RB piar
            elseif tab == 2 then
                if imgui.Button(u8"��������: "..tostring(fbpiar1), imgui.ImVec2(185, 20)) then fbpiar1 = not fbpiar1 end
                imgui.SameLine()
                imgui.InputTextWithHint(u8'##��� ������', u8'����� ����� � /fb', textfb1, 256)
                imgui.PushItemWidth(585)
                imgui.InputInt(u8'##������', delayfb1)
                if imgui.IsItemHovered() then
                    imgui.BeginTooltip()
                    imgui.Text(u8'���� �������� � ��������')
                    imgui.EndTooltip()
                end
                imgui.SameLine()
                imgui.SetCursorPos(imgui.ImVec2(5, 70))
                if imgui.BeginChild('Name##'..tab, imgui.ImVec2(600, 400), true) then
                    if imgui.Button(u8"��������: "..tostring(fbpiar2), imgui.ImVec2(185, 20)) then fbpiar2 = not fbpiar2 end
                    imgui.SameLine()
                    imgui.InputTextWithHint(u8'##��� ������', u8'����� ����� � /fb', textfb2, 236)
                    imgui.PushItemWidth(585)
                    imgui.InputInt(u8'##������', delayfb2)
                    if imgui.IsItemHovered() then
                        imgui.BeginTooltip()
                        imgui.Text(u8'���� �������� � ��������')
                        imgui.EndTooltip()
                    end
                    imgui.SetCursorPos(imgui.ImVec2(1, 110))
                    if imgui.BeginChild('Name##'..tab, imgui.ImVec2(585, 100), true) then
                        if imgui.Button(u8"��������: "..tostring(fbpiar3), imgui.ImVec2(185, 20)) then fbpiar3 = not fbpiar3 end
                        imgui.SameLine()
                        imgui.InputTextWithHint(u8'##��� ������', u8'����� ����� � /fb', textfb3, 256)
                        imgui.PushItemWidth(570)
                        imgui.InputInt(u8'##������', delayfb3)
                        if imgui.IsItemHovered() then
                            imgui.BeginTooltip()
                            imgui.Text(u8'���� �������� � ��������')
                            imgui.EndTooltip()
                        end
                        imgui.EndChild()
                    end
                    imgui.EndChild()
                end
            --==fam and al piar==--
            elseif tab == 3 then
                if imgui.Button(u8"��������: "..tostring(fampiar1), imgui.ImVec2(185, 20)) then fampiar1 = not fampiar1 end
                imgui.SameLine()
                imgui.InputTextWithHint(u8'##��� ������', u8'����� ����� � /fam', textfam1, 256)
                imgui.PushItemWidth(585)
                imgui.InputInt(u8'##������', delayfam1)
                if imgui.IsItemHovered() then
                    imgui.BeginTooltip()
                    imgui.Text(u8'���� �������� � ��������')
                    imgui.EndTooltip()
                end
                imgui.SameLine()
                imgui.SetCursorPos(imgui.ImVec2(5, 70))
                if imgui.BeginChild('Name##'..tab, imgui.ImVec2(600, 380), true) then
                    if imgui.Button(u8"��������: "..tostring(fampiar2), imgui.ImVec2(185, 20)) then fampiar2 = not fampiar2 end
                    imgui.SameLine()
                    imgui.InputTextWithHint(u8'##��� ������', u8'����� ����� � /fam', textfam2, 236)
                    imgui.PushItemWidth(585)
                    imgui.InputInt(u8'##������', delayfam2)
                    if imgui.IsItemHovered() then
                        imgui.BeginTooltip()
                        imgui.Text(u8'���� �������� � ��������')
                        imgui.EndTooltip()
                    end
                    imgui.SetCursorPos(imgui.ImVec2(1, 110))
                    if imgui.BeginChild('Name##'..tab, imgui.ImVec2(585, 100), true) then
                        if imgui.Button(u8"��������: "..tostring(fampiar3), imgui.ImVec2(185, 20)) then fampiar3 = not fampiar3 end
                        imgui.SameLine()
                        imgui.InputTextWithHint(u8'##��� ������', u8'����� ����� � /fam', textfam3, 256)
                        imgui.PushItemWidth(570)
                        imgui.InputInt(u8'##������', delayfam3)
                        if imgui.IsItemHovered() then
                            imgui.BeginTooltip()
                            imgui.Text(u8'���� �������� � ��������')
                            imgui.EndTooltip()
                        end
                        imgui.EndChild()
                    end
                    imgui.EndChild()
                end
                if imgui.Button(u8"���� 1 ������ � /al: "..tostring(alpiar), imgui.ImVec2(192, 25)) then alpiar = not alpiar end
                imgui.SameLine()
                if imgui.Button(u8"���� 2 ������ � /al: "..tostring(alpiar2), imgui.ImVec2(192, 25)) then alpiar2 = not alpiar2 end
                imgui.SameLine()
                if imgui.Button(u8"���� 3 ������ � /al: "..tostring(alpiar3), imgui.ImVec2(192, 25)) then alpiar3 = not alpiar3 end
            elseif tab == 4 then
                if imgui.Combo(u8'����',colorListNumber,colorListBuffer, #colorList) then
                    theme[colorListNumber[0]+1].change()
                    ini.themes.number = colorListNumber[0]
                    inicfg.save(ini, ininame)
                end
                if imgui.CollapsingHeader(u8'�������� ���������') then
                    imgui.Text(u8"�������� ����� ������ � ������ ����������")
                    imgui.SliderInt(u8'##������', delaytwofb, 1, 650)
                    imgui.Separator()
                end
                if imgui.CollapsingHeader(u8'��������� ����� � ��') then
                    imgui.InputTextWithHint(u8'##��� ������', u8'����� ����� � /ad', textad, 256)
                    imgui.SameLine()
                    if imgui.Button("sf") then
                        sfpiar = not sfpiar
                        notf.addNotification(string.format(sfpiar and "[Autopiar] ���� � ����� �� �������!!\n�� ����� ���������: "..addelay[0].." ���" or "[Autopiar] ���� � ����� �� ��������!"), 3)
                    end
                    imgui.SameLine()
                    if imgui.Button("lv") then
                        lvpiar = not lvpiar
                        notf.addNotification(string.format(lvpiar and "[Autopiar] ���� � ����� �� �������!!\n�� ����� ���������: "..addelay[0].." ���" or "[Autopiar] ���� � ����� �� ��������!"), 3)
                    end
                    imgui.SameLine()
                    if imgui.Button("ls") then
                        lspiar = not lspiar
                        notf.addNotification(string.format(lspiar and "[Autopiar] ���� � ����� �� �������!\n�� ����� ���������: "..addelay[0].." ���" or "[Autopiar] ���� � ����� �� ��������!"), 3)
                    end
                    imgui.SameLine()
                    if imgui.Button("biz") then
                        bis = not bis
                        notf.addNotification(string.format(bis and "[Autopiar] ���� ���� �������!\n�� ����� ���������: "..addelay[0].." ���" or "[Autopiar] ���� ���� ��������!"), 3)
                    end
                    imgui.SameLine()
                    imgui.PushItemWidth(70)
                    imgui.InputInt("##f", addelay)
                    if imgui.IsItemHovered() then
                        imgui.BeginTooltip()
                        imgui.Text(u8'���� �������� � ��������')
                        imgui.EndTooltip()
                    end
                   
                    imgui.Separator()
                end
                imgui.SetCursorPos(imgui.ImVec2(5, 430))
                if imgui.Button(u8'save', imgui.ImVec2(590, 50)) then
                    ini.vrtext.vrt1 = u8:decode(ffi.string(inputField))
                    ini.vrtext.vrt2 = u8:decode(ffi.string(textvr2))
                    ini.vrtext.vrt3 = u8:decode(ffi.string(textvr3))
                    ini.fbtext.fbt1 = u8:decode(ffi.string(textfb1))
                    ini.fbtext.fbt2 = u8:decode(ffi.string(textfb2))
                    ini.fbtext.fbt3 = u8:decode(ffi.string(textfb3))
                    ini.famtext.famt1 = u8:decode(ffi.string(textfam1))
                    ini.famtext.famt2 = u8:decode(ffi.string(textfam2))
                    ini.famtext.famt3 = u8:decode(ffi.string(textfam3))
                    ini.adtext.adt = u8:decode(ffi.string(textad))
                    notf.addNotification(string.format("[Autopiar] ��������� �������!!!!!!!!!"), 10)
                    inicfg.save(ini, ininame)
                end
            end
            imgui.EndChild()
        end
        imgui.End()
    end)


function main()
    sampRegisterChatCommand('piar', function() WinState[0] = not WinState[0] end) -- ������� �� ������� ����� ���������� ���� ����
    --==VR PIAR==--
    lua_thread.create(function()
        while true do
            wait(0)
            if vrpiar and inputField[0] ~= 0 then
                textPPP = u8:decode(ffi.string(inputField))
                sampSendChat("/vr "..textPPP)
                if vrpiar2 or vrpiar3 then
                    wait(delaytwofb[0]*1000)
                else
                    wait(delayvr1[0]*1000)
                end
            elseif vrpiar then
                vrpiar = false
                sampAddChatMessage("������� ����� � �����", -1)
            end
            if vrpiar3 and textvr3[0] ~= 0 then
                textx = u8:decode(ffi.string(textvr3))
                sampSendChat("/vr "..textx)
                wait(delayvr3[0]*1000)
            elseif vrpiar3 then
                vrpiar3 = false
                sampAddChatMessage("������� ����� � �����", -1)
            end
            if vrpiar2 and textvr2[0] ~= 0 then
                texts = u8:decode(ffi.string(textvr2))
                sampSendChat("/vr "..texts)
                wait(delayvr2[0]*1000)
            elseif vrpiar2 then
                vrpiar2 = false
                sampAddChatMessage("������� ����� � �����", -1)
            end
        end
    end)
    --==FBPIAR==--
    lua_thread.create(function()
        while true do
            wait(0)
            if fbpiar1 and textfb1[0] ~= 0 then
                textF = u8:decode(ffi.string(textfb1))
                sampSendChat("/fb "..textF)
                wait(1000)
                sampSendChat("/rb "..textF)
                if fbpiar2 or fbpiar3 then
                    wait(delaytwofb[0]*1000)
                else
                    wait(delayfb1[0]*1000)
                end
            elseif fbpiar1 then
                fbpiar1 = false
                sampAddChatMessage("������� ����� � �����", -1)
            end
            if fbpiar2 and textfb2[0] ~= 0 then
                textP = u8:decode(ffi.string(textfb2))
                sampSendChat("/fb "..textP)
                wait(1000)
                sampSendChat("/rb "..textP)
                wait(delayfb2[0]*1000)
            elseif fbpiar2 then
                fbpiar2 = false
                sampAddChatMessage("������� ����� � �����", -1)
            end
            if fbpiar3 and textfb3[0] ~= 0 then
                textXX = u8:decode(ffi.string(textfb3))
                sampSendChat("/fb "..textXX)
                wait(1000)
                sampSendChat("/rb "..textXX)
                wait(delayfb3[0]*1000)
            elseif fbpiar3 then
                fbpiar3 = false
                sampAddChatMessage("������� ����� � �����", -1)
            end
        end
    end)
    --==fampiar==--
    lua_thread.create(function()
        while true do
            wait(0)
            if fampiar1 and textfam1[0] ~= 0 then
                textFF = u8:decode(ffi.string(textfam1))
                sampSendChat("/fam "..textFF)
                if fampiar2 or fampiar3 then
                    wait(delaytwofb[0]*1000)
                else
                    wait(delayfam1[0]*1000)
                end
            elseif fampiar1 then
                fampiar1 = false
                sampAddChatMessage("������� ����� � �����", -1)
            end
            if fampiar2 and textfam2[0] ~= 0 then
                textPP = u8:decode(ffi.string(textfam2))
                sampSendChat("/fam "..textPP)
                wait(delayfam2[0]*1000)
            elseif fampiar2 then
                fampiar2 = false
                sampAddChatMessage("������� ����� � �����", -1)
            end
            if fampiar3 and textfam3[0] ~= 0 then
                textXXX = u8:decode(ffi.string(textfam3))
                sampSendChat("/fam "..textXXX)
                wait(delayfam3[0]*1000)
            elseif fampiar3 then
                fampiar3 = false
                sampAddChatMessage("������� ����� � �����", -1)
            end
        end
    end)
    --==alpiar==--
    lua_thread.create(function()
        while true do
            wait(0)
            if alpiar and textfam1[0] ~= 0 then
                textFFF = u8:decode(ffi.string(textfam1))
                sampSendChat("/al "..textFFF)
                if alpiar2 or alpiar3 then
                    wait(delaytwofb[0]*1000)
                else
                    wait(delayfam1[0]*1000)
                end
            elseif alpiar then
                alpiar1= false
                sampAddChatMessage("������� ����� � �����", -1)
            end
            if alpiar2 and textfam2[0] ~= 0 then
                textFFFF = u8:decode(ffi.string(textfam2))
                sampSendChat("/al "..textFFFF)
                wait(delayfam2[0]*1000)
            elseif alpiar2 then
                alpiar2 = false
                sampAddChatMessage("������� ����� � �����", -1)
            end
            if alpiar3 and textfam3[0] ~= 0 then
                textFFFFF = u8:decode(ffi.string(textfam3))
                sampSendChat("/al "..textFFFFF)
                wait(delayfam3[0]*1000)
            elseif alpiar3 then
                alpiar3 = false
                sampAddChatMessage("������� ����� � �����", -1)
            end
        end
    end)
    --==adpiar==--
    lua_thread.create(function()
        while true do
            wait(0)
            if sfpiar or lspiar or lvpiar then
                textXXXX = u8:decode(ffi.string(textad))
                sampSendChat("/ad "..textXXXX)
                wait(addelay[0]*1000)
            end
        end
    end)
    wait(-1)
end

 
imgui.OnInitialize(function()
    decor()
    if ini.themes.number == 0 then
        theme[1].change()
    elseif ini.themes.number == 1 then
        theme[2].change()
    elseif ini.themes.number == 2 then
        theme[3].change()
    elseif ini.themes.number == 3 then
        theme[4].change()
    end
    imgui.GetIO().IniFilename = nil
    local config = imgui.ImFontConfig()
    config.MergeMode = true
    config.PixelSnapH = true
    iconRanges = imgui.new.ImWchar[3](faicons.min_range, faicons.max_range, 0)
    imgui.GetIO().Fonts:AddFontFromMemoryCompressedBase85TTF(faicons.get_font_data_base85('solid'), 14, config, iconRanges)
  end)
 
  function decor()
      imgui.SwitchContext()
      local style = imgui.GetStyle()
      local colors = style.Colors
      local clr = imgui.Col
      local ImVec4 = imgui.ImVec4
 
      -->> Sizez
      imgui.GetStyle().WindowPadding = imgui.ImVec2(4, 4)
      imgui.GetStyle().FramePadding = imgui.ImVec2(4, 3)
      imgui.GetStyle().ItemSpacing = imgui.ImVec2(8, 4)
      imgui.GetStyle().ItemInnerSpacing = imgui.ImVec2(4, 4)
      imgui.GetStyle().TouchExtraPadding = imgui.ImVec2(0, 0)
 
      imgui.GetStyle().IndentSpacing = 21
      imgui.GetStyle().ScrollbarSize = 14
      imgui.GetStyle().GrabMinSize = 10
 
      imgui.GetStyle().WindowBorderSize = 0
      imgui.GetStyle().ChildBorderSize = 1
      imgui.GetStyle().PopupBorderSize = 1
      imgui.GetStyle().FrameBorderSize = 1
      imgui.GetStyle().TabBorderSize = 0
 
      imgui.GetStyle().WindowRounding = 5
      imgui.GetStyle().ChildRounding = 5
      imgui.GetStyle().PopupRounding = 5
      imgui.GetStyle().FrameRounding = 5
      imgui.GetStyle().ScrollbarRounding = 2.5
      imgui.GetStyle().GrabRounding = 5
      imgui.GetStyle().TabRounding = 5
      imgui.GetStyle().WindowTitleAlign = imgui.ImVec2(0.50, 0.50)
 

  end
я выше скинул только под себя настрой
 

SeregaIvanovis

Активный
118
33
хули вы мучаетесь
хз делать нехуй

можешь сказать что и как настроить я новичек просто в луа?
иди луа учи а не код строчи
 

Hinаta

Известный
778
360
он слишком новичок
тогда тем более в тупом заучивании смысла нет. Придумал себе идею - делаешь. Чего-то не знаешь - ищешь информацию - это всё запоминается. Профит. Без практики ЯП учить это ёбанный стыд, по-моему