Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require "lib.sampfuncs"
- require "lib.moonloader"
- local sampev = require 'lib.samp.events'
- local imgui = require 'imgui'
- local encoding = require 'encoding'
- encoding.default = 'CP1251'
- u8 = encoding.UTF8
- imgui.SwitchContext()
- local style = imgui.GetStyle()
- local colors = style.Colors
- local clr = imgui.Col
- local ImVec4 = imgui.ImVec4
- colors[clr.Text] = ImVec4(0.00, 0.00, 0.00, 0.51)
- colors[clr.TextDisabled] = ImVec4(0.24, 0.24, 0.24, 1.00)
- colors[clr.WindowBg] = ImVec4(1.00, 1.00, 1.00, 1.00)
- colors[clr.ChildWindowBg] = ImVec4(0.96, 0.96, 0.96, 1.00)
- colors[clr.PopupBg] = ImVec4(0.92, 0.92, 0.92, 1.00)
- colors[clr.Border] = ImVec4(0.86, 0.86, 0.86, 1.00)
- colors[clr.BorderShadow] = ImVec4(0.00, 0.00, 0.00, 0.00)
- colors[clr.FrameBg] = ImVec4(0.88, 0.88, 0.88, 1.00)
- colors[clr.FrameBgHovered] = ImVec4(0.82, 0.82, 0.82, 1.00)
- colors[clr.FrameBgActive] = ImVec4(0.76, 0.76, 0.76, 1.00)
- colors[clr.TitleBg] = ImVec4(0.00, 0.45, 1.00, 0.82)
- colors[clr.TitleBgCollapsed] = ImVec4(0.00, 0.45, 1.00, 0.82)
- colors[clr.TitleBgActive] = ImVec4(0.00, 0.45, 1.00, 0.82)
- colors[clr.MenuBarBg] = ImVec4(0.00, 0.37, 0.78, 1.00)
- colors[clr.ScrollbarBg] = ImVec4(0.00, 0.00, 0.00, 0.00)
- colors[clr.ScrollbarGrab] = ImVec4(0.00, 0.35, 1.00, 0.78)
- colors[clr.ScrollbarGrabHovered] = ImVec4(0.00, 0.33, 1.00, 0.84)
- colors[clr.ScrollbarGrabActive] = ImVec4(0.00, 0.31, 1.00, 0.88)
- colors[clr.ComboBg] = ImVec4(0.92, 0.92, 0.92, 1.00)
- colors[clr.CheckMark] = ImVec4(0.00, 0.49, 1.00, 0.59)
- colors[clr.SliderGrab] = ImVec4(0.00, 0.49, 1.00, 0.59)
- colors[clr.SliderGrabActive] = ImVec4(0.00, 0.39, 1.00, 0.71)
- colors[clr.Button] = ImVec4(0.00, 0.49, 1.00, 0.59)
- colors[clr.ButtonHovered] = ImVec4(0.00, 0.49, 1.00, 0.71)
- colors[clr.ButtonActive] = ImVec4(0.00, 0.49, 1.00, 0.78)
- colors[clr.Header] = ImVec4(0.00, 0.49, 1.00, 0.78)
- colors[clr.HeaderHovered] = ImVec4(0.00, 0.49, 1.00, 0.71)
- colors[clr.HeaderActive] = ImVec4(0.00, 0.49, 1.00, 0.78)
- colors[clr.ResizeGrip] = ImVec4(0.00, 0.39, 1.00, 0.59)
- colors[clr.ResizeGripHovered] = ImVec4(0.00, 0.27, 1.00, 0.59)
- colors[clr.ResizeGripActive] = ImVec4(0.00, 0.25, 1.00, 0.63)
- colors[clr.CloseButton] = ImVec4(0.00, 0.35, 0.96, 0.71)
- colors[clr.CloseButtonHovered] = ImVec4(0.00, 0.31, 0.88, 0.69)
- colors[clr.CloseButtonActive] = ImVec4(0.00, 0.25, 0.88, 0.67)
- colors[clr.PlotLines] = ImVec4(0.00, 0.39, 1.00, 0.75)
- colors[clr.PlotLinesHovered] = ImVec4(0.00, 0.39, 1.00, 0.75)
- colors[clr.PlotHistogram] = ImVec4(0.00, 0.39, 1.00, 0.75)
- colors[clr.PlotHistogramHovered] = ImVec4(0.00, 0.35, 0.92, 0.78)
- colors[clr.TextSelectedBg] = ImVec4(0.00, 0.47, 1.00, 0.59)
- colors[clr.ModalWindowDarkening] = ImVec4(0.20, 0.20, 0.20, 0.35)
- local Deagle_state = imgui.ImBool(false)
- local M4_state = imgui.ImBool(false)
- local Rpg_state = imgui.ImBool(false)
- local Shotgun_state = imgui.ImBool(false)
- local Mp5_state = imgui.ImBool(false)
- local Ak47_state = imgui.ImBool(false)
- local slider1 = imgui.ImBool(false)
- local main_window_state = imgui.ImBool(false)
- local text_buffer = imgui.ImBuffer(256)
- local doHide = true
- local working = false
- imgui.Process = false
- function cmd_imgui(arg)
- main_window_state.v = not main_window_state.v
- imgui.Process = main_window_state.v
- end
- function imgui.OnDrawFrame()
- imgui.SetNextWindowSize(imgui.ImVec2(250, 300), imgui.Cond.FirstUseEver)
- imgui.Begin(u8"TR - Настройки", main_window_state)
- imgui.Text(u8"Выбор оружия")
- imgui.Text(u8" ")
- imgui.Checkbox("Deagle", Deagle_state)
- imgui.Checkbox("M4", M4_state)
- imgui.Checkbox("Ak47", Ak47_state)
- imgui.Checkbox("Shotgun", Shotgun_state)
- imgui.Checkbox("Rpg", Rpg_state)
- imgui.Checkbox("Mp5", Mp5_state)
- imgui.End()
- end
- function main()
- while not isSampAvailable() do wait(0) end
- main_window_stat = false
- sampAddChatMessage("Скрипт tr запущен. Автор P0M61KxMUERTOS. Активация - /tr.", -1)
- sampRegisterChatCommand("tr", function()
- working = not working
- if working then
- whielka = 1
- sampAddChatMessage("tr by P0M61K - ON", -1)
- else
- whielka = 0
- sampAddChatMessage("tr by P0M61K - OFF", -1)
- end
- end)
- sampRegisterChatCommand("trmenu", cmd_imgui)
- function sampev.onSendSpawn()
- doHide = true
- end
- while true do wait(0)
- if main_window_state.v == false then
- imgui.Process = false
- end
- if whielka == 1 then
- if doHide and getCharHealth(PLAYER_PED) < 50 then
- if deagle_state.v then
- sampAddChatMessage("Deagle", -1)
- end
- if m4_state.v then
- sampAddChatMessage("M4", -1)
- end
- if shotgun_state.v then
- sampAddChatMessage("Shotgun", -1)
- end
- if rpg_state.v then
- sampAddChatMessage("Rpg", -1)
- end
- if mp5_state.v then
- sampAddChatMessage("Mp5", -1)
- end
- if ak47_state.v then
- sampAddChatMessage("ak47", -1)
- end
- doHide = false
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement