- 44
- 2
Нарушение правил раздела
почему не работает 2 вкладка 'Мелкие читы' и почему она другого цвета
lua:
local imgui = require 'mimgui'
local encoding = require 'encoding'
encoding.default = 'CP1251'
local u8 = encoding.UTF8
local new = imgui.new
local WinState = imgui.new.bool()
local SliderOne = new.int(2)
local Slider2 = new.int(2)
local Slider3 = new.int(2)
local Slider4 = new.int(2)
local Slider5 = new.int(2)
local Slider6 = new.int(2)
local tab = 1
local ComboTest = new.int()
local item_list = {u8'Авторы', u8'Читы'}
local ImItems = imgui.new['const char*'][#item_list](item_list)
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(800, 650), imgui.Cond.Always)
imgui.Begin(u8 ' qqwe & langv ', WinState, imgui.WindowFlags.NoResize)
for numberTab, nameTab in pairs({ ' Персонаж', ' Машина', ' Авторы' }) do
if imgui.Button(u8(nameTab), imgui.ImVec2(200, 180)) then
tab = numberTab
end
end
imgui.SetCursorPos(imgui.ImVec2(210, 40))
if imgui.BeginChild('Name##' .. tab, imgui.ImVec2(600, 580), true) then
if tab == 1 then
imgui.Text(u8 'Инвиз с ног.')
if imgui.Button(u8 'Кнопка 1') then
sampAddChatMessage('Успешно! ', -1)
end
if imgui.Button(u8 'Кнопка 2') then
sampAddChatMessage('Успешно!', -1)
end
if imgui.Button(u8 'Кнопка 3') then
sampAddChatMessage('Успешно!', -1)
end
if imgui.Button(u8 'Кнопка 4') then
sampAddChatMessage('Успешно! ', -1)
end
if imgui.Button(u8 'Кнопка 5') then
sampAddChatMessage('Успешно! ', -1)
end
if imgui.Button(u8 'Кнопка 6') then
sampAddChatMessage('Успешно! ', -1)
end
elseif tab == 2 then
imgui.Text(u8 'Инвиз в машине')
if imgui.Button(u8 'Кнопка 1') then
sampAddChatMessage('Успешно! ', -1)
end
imgui.SliderInt(u8 '1', SliderOne, -130, 130)
if imgui.Button(u8 'Кнопка 2') then
sampAddChatMessage('Успешно! ', -1)
end
imgui.SliderInt(u8 '2', Slider2, -130, 130)
if imgui.Button(u8 'Кнопка 3') then
sampAddChatMessage('Успешно! ', -1)
end
imgui.SliderInt(u8 '3', Slider3, -130, 130)
if imgui.Button(u8 'Кнопка 4') then
sampAddChatMessage('Успешно! ', -1)
end
imgui.SliderInt(u8 '4', Slider4, -130, 130)
if imgui.Button(u8 'Кнопка 5') then
sampAddChatMessage('Успешно! ', -1)
end
imgui.SliderInt(u8 '5', Slider5, -130, 130)
if imgui.Button(u8 'Кнопка 6') then
sampAddChatMessage('Успешно! ', -1)
end
imgui.SliderInt(u8 '6', Slider6, -130, 130)
elseif tab == 3 then
if imgui.BeginTabBar('Tabs') then
if imgui.BeginTabItem(u8'Авторы') then
imgui.Text(u8 'menu -> qqre')
imgui.Text(u8 'script -> langv')
if imgui.Button(u8 'наши тг') then
sampAddChatMessage('tg - qqre tg - langv ', -1)
imgui.EndTabItem()
end
if imgui.BeginTabItem(u8'Мелкие читы') then
if imgui.Button('Суицид') then
setCharHealth(PLAYER_PED, 0)
sampAddChatMessage(u8'Вы успешно умерли!')
end
imgui.EndTabItem()
end
imgui.EndTabBar()
end
end
end
imgui.EndChild()
end
imgui.End()
end)
-- раздал опиума
imgui.OnInitialize(function()
theme()
end)
function theme()
imgui.SwitchContext()
local style = imgui.GetStyle()
local colors = style.Colors
local clr = imgui.Col
local ImVec4 = imgui.ImVec4
imgui.GetStyle().FramePadding = imgui.ImVec2(3.5, 3.5)
imgui.GetStyle().FrameRounding = 3
imgui.GetStyle().ChildRounding = 2
imgui.GetStyle().WindowTitleAlign = imgui.ImVec2(0.5, 0.5)
imgui.GetStyle().WindowRounding = 2
imgui.GetStyle().ItemSpacing = imgui.ImVec2(5.0, 4.0)
imgui.GetStyle().ScrollbarSize = 13.0
imgui.GetStyle().ScrollbarRounding = 1
imgui.GetStyle().GrabMinSize = 8.0
imgui.GetStyle().GrabRounding = 1.0
imgui.GetStyle().WindowPadding = imgui.ImVec2(4.0, 4.0)
imgui.GetStyle().ButtonTextAlign = imgui.ImVec2(0.0, 0.5)
imgui.GetStyle().WindowRounding = 14
imgui.GetStyle().Colors[imgui.Col.WindowBg] = imgui.ImVec4(0.14, 0.12, 0.16, 1.00)
imgui.GetStyle().Colors[imgui.Col.ChildBg] = imgui.ImVec4(0.30, 0.20, 0.39, 0.00)
imgui.GetStyle().Colors[imgui.Col.PopupBg] = imgui.ImVec4(0.05, 0.05, 0.10, 0.90)
imgui.GetStyle().Colors[imgui.Col.Border] = imgui.ImVec4(0.89, 0.85, 0.92, 0.30)
imgui.GetStyle().Colors[imgui.Col.BorderShadow] = imgui.ImVec4(0.00, 0.00, 0.00, 0.00)
imgui.GetStyle().Colors[imgui.Col.FrameBg] = imgui.ImVec4(0.30, 0.20, 0.39, 1.00)
imgui.GetStyle().Colors[imgui.Col.FrameBgHovered] = imgui.ImVec4(0.41, 0.19, 0.63, 0.68)
imgui.GetStyle().Colors[imgui.Col.FrameBgActive] = imgui.ImVec4(0.41, 0.19, 0.63, 1.00)
imgui.GetStyle().Colors[imgui.Col.TitleBg] = imgui.ImVec4(0.41, 0.19, 0.63, 0.45)
imgui.GetStyle().Colors[imgui.Col.TitleBgCollapsed] = imgui.ImVec4(0.41, 0.19, 0.63, 0.35)
imgui.GetStyle().Colors[imgui.Col.TitleBgActive] = imgui.ImVec4(0.41, 0.19, 0.63, 0.78)
imgui.GetStyle().Colors[imgui.Col.MenuBarBg] = imgui.ImVec4(0.30, 0.20, 0.39, 0.57)
imgui.GetStyle().Colors[imgui.Col.ScrollbarBg] = imgui.ImVec4(0.30, 0.20, 0.39, 1.00)
imgui.GetStyle().Colors[imgui.Col.ScrollbarGrab] = imgui.ImVec4(0.41, 0.19, 0.63, 0.31)
imgui.GetStyle().Colors[imgui.Col.ScrollbarGrabHovered] = imgui.ImVec4(0.41, 0.19, 0.63, 0.78)
imgui.GetStyle().Colors[imgui.Col.ScrollbarGrabActive] = imgui.ImVec4(0.41, 0.19, 0.63, 1.00)
imgui.GetStyle().Colors[imgui.Col.CheckMark] = imgui.ImVec4(0.56, 0.61, 1.00, 1.00)
imgui.GetStyle().Colors[imgui.Col.SliderGrab] = imgui.ImVec4(0.41, 0.19, 0.63, 0.24)
imgui.GetStyle().Colors[imgui.Col.SliderGrabActive] = imgui.ImVec4(0.41, 0.19, 0.63, 1.00)
imgui.GetStyle().Colors[imgui.Col.Button] = imgui.ImVec4(0.41, 0.19, 0.63, 0.44)
imgui.GetStyle().Colors[imgui.Col.ButtonHovered] = imgui.ImVec4(0.41, 0.19, 0.63, 0.86)
imgui.GetStyle().Colors[imgui.Col.ButtonActive] = imgui.ImVec4(0.64, 0.33, 0.94, 1.00)
imgui.GetStyle().Colors[imgui.Col.Header] = imgui.ImVec4(0.41, 0.19, 0.63, 0.76)
imgui.GetStyle().Colors[imgui.Col.HeaderHovered] = imgui.ImVec4(0.41, 0.19, 0.63, 0.86)
imgui.GetStyle().Colors[imgui.Col.HeaderActive] = imgui.ImVec4(0.41, 0.19, 0.63, 1.00)
imgui.GetStyle().Colors[imgui.Col.ResizeGrip] = imgui.ImVec4(0.41, 0.19, 0.63, 0.20)
imgui.GetStyle().Colors[imgui.Col.ResizeGripHovered] = imgui.ImVec4(0.41, 0.19, 0.63, 0.78)
imgui.GetStyle().Colors[imgui.Col.ResizeGripActive] = imgui.ImVec4(0.41, 0.19, 0.63, 1.00)
imgui.GetStyle().Colors[imgui.Col.PlotLines] = imgui.ImVec4(0.89, 0.85, 0.92, 0.63)
imgui.GetStyle().Colors[imgui.Col.PlotLinesHovered] = imgui.ImVec4(0.41, 0.19, 0.63, 1.00)
imgui.GetStyle().Colors[imgui.Col.PlotHistogram] = imgui.ImVec4(0.89, 0.85, 0.92, 0.63)
imgui.GetStyle().Colors[imgui.Col.PlotHistogramHovered] = imgui.ImVec4(0.41, 0.19, 0.63, 1.00)
imgui.GetStyle().Colors[imgui.Col.TextSelectedBg] = imgui.ImVec4(0.41, 0.19, 0.63, 0.43)
end
function main()
sampRegisterChatCommand('offset', function() WinState[0] = not WinState[0] end)
wait(-1)
end