SlonPvpru

[For All] FluyKarr

Jun 4th, 2020
1,024
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 23.98 KB | None | 0 0
  1. -- https://www.blast.hk/threads/19329/
  2.  
  3. script_name('FluyKarr')
  4. script_author('Azller')
  5. local inik = require 'inicfg'
  6. local imgui = require 'imgui'
  7. local key = require 'vkeys'
  8. local imgui = require 'imgui'
  9. local encoding = require 'encoding'
  10. encoding.default = 'CP1251'
  11. u8 = encoding.UTF8
  12. local main_window_state = imgui.ImBool(false)
  13. local cb_lock_player = imgui.ImBool(imgui.LockPlayer)
  14.  
  15. function activation()
  16.   if isCharInAnyCar(PLAYER_PED) then
  17.   toggle = not toggle
  18.   if toggle then
  19.     sampAddChatMessage("{30F867}[FKarr] {FFFFFF}Скрипт был успешно {30F867}aктивирован!", 0x30F867)
  20.   else
  21.     sampAddChatMessage("{F86630}[FKarr] {FFFFFF}Скрипт был {F86630}остановлен!", 0xF86630)
  22.   end
  23. else
  24.   sampAddChatMessage("{F86630}[FKarr] {FFFFFF}Вы должны находиться в авто! {F86630}Скрипт не был запущен!", 0xF86630)
  25. end
  26. end
  27.  
  28.  
  29. function main()
  30.     mode = 0
  31.     local thread = lua_thread.create(autooff)
  32.     local thread = lua_thread.create(img)
  33.   tableMain = {
  34.   [65] = {0.0, 0.0, 4.0},
  35.   [68] = {0.0, 0.0, -4.0},
  36.   [83] = {4.0, 0.0, 0.0},
  37.   [87] = {-4.0, 0.0, 0.0}
  38.   }
  39.     tableMainA = {
  40.     [37] = {0.0, 0.0, 4.0},
  41.     [39] = {0.0, 0.0, -4.0},
  42.     [40] = {4.0, 0.0, 0.0},
  43.     [38] = {-4.0, 0.0, 0.0}
  44.     }
  45.   tableParams = {
  46.   [65] = {0.0, -3.9, 0.0},
  47.   [68] = {0.0, 3.9, 0.0}
  48.   }
  49.     tableParamsA = {
  50.     [37] = {0.0, -3.9, 0.0},
  51.     [39] = {0.0, 3.9, 0.0}
  52.     }
  53.   tableAlt = {
  54.   [65] = {65},
  55.   [68] = {68}
  56.   }
  57.   tableFunctions = {
  58.     [50] = {18.0},
  59.     [51] = {-18.0}
  60.     }
  61.     tableLite = {
  62.     [65] = {0.0, 0.0, 2.0},
  63.     [68] = {0.0, 0.0, -2.0},
  64.     [83] = {2.0, 0.0, 0.0},
  65.     [87] = {-2.0, 0.0, 0.0}
  66.     }
  67.     tableLiteA = {
  68.     [37] = {0.0, 0.0, 2.0},
  69.     [39] = {0.0, 0.0, -2.0},
  70.     [40] = {2.0, 0.0, 0.0},
  71.     [38] = {-2.0, 0.0, 0.0}
  72.     }
  73. local file = doesFileExist("moonloader//FluyKarr.lua")
  74. if file == false then
  75. wait(8000)
  76. sampAddChatMessage("{F86630}[FKarr] {d5dedd}Верните оригинальное название скрипта! {F86630}(FluyKarr.luac)", 0xF86630)
  77. else
  78. wait(8000)
  79. sampAddChatMessage("{30F867}[FKarr] {d5dedd}Скрипт был успешно загружен! {30F867}Автор: Azller", 0x30F867)
  80. sampAddChatMessage("{30F867}[FKarr] {d5dedd}Stable(?) {0094c8}v2.0", 0x30F867)
  81. sampAddChatMessage("{30F867}[FKarr] {d5dedd}Для активации окна с настройками нажмите: {0094c8}CTRL + C", 0x30F867)
  82. sampAddChatMessage("{30F867}[FKarr] {d5dedd}Special for {0094c8}Blast{d5dedd}.hk", 0x30F867)
  83. sampRegisterChatCommand("fk", activation)
  84. sampRegisterChatCommand("drpspeed", drpspeed)
  85. sampRegisterChatCommand("arpspeed", arpspeed)
  86. sampRegisterChatCommand("srpspeed", srpspeed)
  87. sampRegisterChatCommand("strpspeed", strpspeed)
  88. sampRegisterChatCommand("defspeed", defspeed)
  89. sampRegisterChatCommand("prf0speed", profileN)
  90. sampRegisterChatCommand("prf1speed", profileT)
  91.     while true do
  92.         wait(0)
  93.         if isKeyDown(16) and toggle and not sampIsCursorActive() and isSampLoaded() and isCharInAnyCar(PLAYER_PED) then
  94.                     ----------------------------------------------------------------------------------
  95.             local car = storeCarCharIsInNoSave(PLAYER_PED)
  96.             local speed = getCarSpeed(car)
  97.                         ---------------------------------------------------------------------------------
  98.             wait(50)
  99.                         if mode == 0 then
  100.                         local speeds = inik.load(nil, "FluyKarr.luac.ini")
  101.             if speeds.settings.speedf ~= nil then
  102.                         speedn = speeds.settings.speedf
  103.                     else speedn = 50.0 end
  104.                     end
  105.                         ----------------------------------------------------------------
  106.                         if mode == 1 then
  107.                         local speeds = inik.load(nil, "FluyKarr.luac.ini")
  108.                         if speeds.settings.speedDrp ~= nil then
  109.                         speedn = speeds.settings.speedDrp
  110.                       else speedn = 23.0 end
  111.                     end
  112.                         ----------------------------------------------------------------
  113.                         if mode == 2 then
  114.                         local speeds = inik.load(nil, "FluyKarr.luac.ini")
  115.                         if speeds.settings.speedArp ~= nil then
  116.                         speedn = speeds.settings.speedArp
  117.                       else speedn = 30.0 end
  118.                     end
  119.                         ----------------------------------------------------------------
  120.                         if mode == 3 then
  121.                         local speeds = inik.load(nil, "FluyKarr.luac.ini")
  122.                         if speeds.settings.speedSrp ~= nil then
  123.                         speedn = speeds.settings.speedSrp
  124.                       else speedn = 45.0 end
  125.                     end
  126.                         ----------------------------------------------------------------
  127.                         if mode == 4 then
  128.                         local speeds = inik.load(nil, "FluyKarr.luac.ini")
  129.                         if speeds.settings.speedStrp ~= nil then
  130.                         speedn = speeds.settings.speedStrp
  131.                     else speedn = 35.0 end
  132.                         end
  133.                         ----------------------------------------------------------------
  134.                         if mode == 5 then
  135.                         local speeds = inik.load(nil, "FluyKarr.luac.ini")
  136.                         if speeds.settings.speedStrp ~= nil then
  137.                         speedn = speeds.settings.speedProfile0
  138.                     else speedn = 35.0 end
  139.                         end
  140.                       ----------------------------------------------------------------
  141.                         if mode == 6 then
  142.                         local speeds = inik.load(nil, "FluyKarr.luac.ini")
  143.                         if speeds.settings.speedStrp ~= nil then
  144.                         speedn = speeds.settings.speedProfile1
  145.                     else speedn = 35.0 end
  146.                         end
  147.             if speed < speedn then setCarForwardSpeed(car, speed * 1.235) end
  148.             if speed > speedn then setCarForwardSpeed(car, speedn + 5.0) end
  149.                         setCarRotationVelocity(car, 0.0, 0.0, 0.0)
  150. ------------------------------------------------------------------------------------------------------------------------------------------------------------------
  151.                         local speeds = inik.load(nil, "FluyKarr.luac.ini")
  152.                         if speeds.settings.control == 1 then
  153.                         for key, param in pairs(tableMain) do
  154.              if isKeyDown(key) then setCarRotationVelocity(car,param[1],param[2],param[3]) end
  155.             end
  156.                     end
  157. ------------------------------------------------------------------------------------------------------------------------------------------------------------------
  158.                         if speeds.settings.control == 2 then
  159.                         for keyA, paramA in pairs(tableMainA) do
  160.                          if isKeyDown(keyA) then setCarRotationVelocity(car,paramA[1],paramA[2],paramA[3]) end
  161.                         end
  162.                       end
  163. ------------------------------------------------------------------------------------------------------------------------------------------------------------------
  164.                         for keyThree, paramThree in pairs(tableFunctions) do
  165.                             if isKeyDown(keyThree) then setCarForwardSpeed(car, paramThree[1]) end
  166.                         end
  167. ------------------------------------------------------------------------------------------------------------------------------------------------------------------
  168.                         if isKeyDown(49) then
  169.                             freezeCarPosition(car, true)
  170.                         else
  171.                             freezeCarPosition(car, false)
  172.                         end
  173. ------------------------------------------------------------------------------------------------------------------------------------------------------------------
  174.                         if speeds.settings.control == 1 then
  175.                         for keyLite, paramLite in pairs(tableLite) do
  176.                          if isKeyJustPressed(keyLite) then setCarRotationVelocity(car,paramLite[1],paramLite[2],paramLite[3]) end
  177.                         end
  178.                     end
  179. ------------------------------------------------------------------------------------------------------------------------------------------------------------------
  180.                         if speeds.settings.control == 2 then
  181.                         for keyLiteA, paramLiteA in pairs(tableLiteA) do
  182.                          if isKeyJustPressed(keyLiteA) then setCarRotationVelocity(car,paramLiteA[1],paramLiteA[2],paramLiteA[3]) end
  183.                         end
  184.                     end
  185. ------------------------------------------------------------------------------------------------------------------------------------------------------------------
  186.                             if speeds.settings.control == 1 then
  187.                             if isKeyDown(18) then
  188.                                 for keyTwo, paramTwo in pairs(tableParams) do
  189.                                 if isKeyDown(keyTwo) then
  190.                                     setCarRotationVelocity(car,paramTwo[1],paramTwo[2],paramTwo[3])
  191.                                     end
  192.                                 end
  193.                             end
  194.                         end
  195. ------------------------------------------------------------------------------------------------------------------------------------------------------------------
  196.                             if speeds.settings.control == 2 then
  197.                             if isKeyDown(18) then
  198.                                 for keyTwoA, paramTwoA in pairs(tableParamsA) do
  199.                                 if isKeyDown(keyTwoA) then
  200.                                     setCarRotationVelocity(car,paramTwoA[1],paramTwoA[2],paramTwoA[3])
  201.                                     end
  202.                                 end
  203.                             end
  204.                         end
  205. ------------------------------------------------------------------------------------------------------------------------------------------------------------------
  206.                     end
  207.                 end
  208.       end
  209.         end
  210.  
  211.   function autooff()
  212.   while true do
  213.   wait(0)
  214.     local speeds = inik.load(nil, "FluyKarr.luac.ini")
  215.     if speeds.settings.autooff then
  216.   if toggle and not isCharInAnyCar(PLAYER_PED) then
  217.     toggle = not toggle
  218.     sampAddChatMessage("{F86630}[FKarr] {d5dedd}Скрипт был автоматически выключен! {F86630}Введите /fk в авто для активации!", 0xF86630)
  219.     end
  220.   end
  221. end
  222. end
  223.  
  224. -- одно из основных отличий от оригинального апи
  225. -- все переменные, значения которых записываются в ImGui по указателю, могут использоваться только через специальные типы
  226. local main_window_state = imgui.ImBool(false)
  227. local main_controls = imgui.ImBool(false)
  228. local main_sett = imgui.ImBool(false)
  229. function imgui.OnDrawFrame()
  230.   if main_window_state.v then  -- чтение и запись значения такой переменной осуществляется через поле v (или Value)
  231.         imgui.SetNextWindowSize(imgui.ImVec2(470, 520), imgui.Cond.FirstUseEver)
  232.         imgui.SetNextWindowPos(imgui.ImVec2(750, 350), imgui.Cond.FirstUseEver)
  233.     imgui.Begin('FluyKarr settings | V2.0', main_window_state)
  234.     imgui.Text(u8'Выберите профиль, по которому будет работать скрипт:')
  235.         local btn_size = imgui.ImVec2(-0.1, 0)
  236.             if imgui.Button(u8'Стандартное значение = 0', btn_size) then
  237.                 mode = 0
  238.             end
  239.             local btn_size = imgui.ImVec2(-0.1, 0)
  240.             if imgui.Button('Diamond RP = 1', btn_size) then
  241.                  mode = 1
  242.             end
  243.             local btn_size = imgui.ImVec2(-0.1, 0)
  244.             if imgui.Button('Advance RP = 2', btn_size) then
  245.                 mode = 2
  246.             end
  247.             local btn_size = imgui.ImVec2(-0.1, 0)
  248.             if imgui.Button("Samp RP = 3", btn_size) then
  249.             mode = 3
  250.                 end
  251.             local btn_size = imgui.ImVec2(-0.1, 0)
  252.             if imgui.Button('Stage RP = 4', btn_size) then
  253.                 mode = 4
  254.             end
  255.             if imgui.Button(u8'Профиль 0 = 5', btn_size) then
  256.                 mode = 5
  257.             end
  258.             if imgui.Button(u8"Профиль 1 = 6", btn_size) then
  259.                 mode = 6
  260.             end
  261.         end
  262.         local speeds = inik.load(nil, "FluyKarr.luac.ini")
  263.     imgui.Text(u8'')
  264.   imgui.Text(u8'Текущий режим: ' .. mode)
  265.     imgui.Text(u8'')
  266.  
  267.     imgui.Text(u8'')
  268.     local btn_size = imgui.ImVec2(-0.1, 0)
  269.                     if imgui.Button(u8"Контроль автовыключения:", btn_size) then
  270.                         local speeds = inik.load(nil, "FluyKarr.luac.ini")
  271.               if speeds.settings.autooff then
  272.                             speeds.settings.autooff = false
  273.                             inik.save(speeds)
  274.                         else
  275.                             speeds.settings.autooff = true
  276.                             inik.save(speeds)
  277.                      end
  278.                  end
  279.                     local speeds = inik.load(nil, "FluyKarr.luac.ini")
  280.           if speeds.settings.autooff then
  281.                         imgui.Text(u8'Автовыключение при выходе из авто: on')
  282.                     else
  283.                         imgui.Text(u8'Автовыключение при выходе из авто: off')
  284.                   end
  285.  
  286.                     if imgui.Button(u8'Управление:', btn_size) then
  287.                         local speeds = inik.load(nil, "FluyKarr.luac.ini")
  288.                         if speeds.settings.control == 1 then
  289.                             speeds.settings.control = 2
  290.                             inik.save(speeds)
  291.                         else
  292.                             speeds.settings.control = 1
  293.                             inik.save(speeds)
  294.                      end
  295.                  end
  296.                     local speeds = inik.load(nil, "FluyKarr.luac.ini")
  297.                     if speeds.settings.control == 1 then
  298.                         imgui.Text(u8'Управление: wasd')
  299.                     else
  300.                         imgui.Text(u8'Управление: стрелочки')
  301.                     end
  302.                     imgui.Text(u8'')
  303.                     if imgui.Button(u8"Информация, команды", btn_size) then
  304.                         main_controls.v = not main_controls.v
  305.                     end
  306.                     if imgui.Button(u8"Мониторинг настроек", btn_size) then
  307.                         main_sett.v = not main_sett.v
  308.                     end
  309.                     imgui.Text(u8'')
  310.                 if imgui.Button(u8'Закрыть', btn_size) then -- а вот и кнопка с действием
  311.                     -- условие будет выполнено при нажатии на неё
  312.                     main_window_state.v = not main_window_state.v
  313.                 end
  314.                 if main_controls.v then
  315.                     imgui.SetNextWindowSize(imgui.ImVec2(470, 520), imgui.Cond.FirstUseEver)
  316.                     imgui.SetNextWindowPos(imgui.ImVec2(280, 350), imgui.Cond.FirstUseEver)
  317.                     imgui.Begin('FluyKarr settings | V2.0 | Info', main_controls)
  318.                     if imgui.CollapsingHeader(u8'Полезные команды') then
  319.                     imgui.Text(u8'')
  320.                     imgui.Text(u8'/defspeed - установить значение скорости для стандартного профиля;')
  321.                     imgui.Text(u8'/drpspeed - установить значение скорости для профиля Diamond;')
  322.                     imgui.Text(u8'/arpspeed - установить значение скорости для профиля Advance;')
  323.                     imgui.Text(u8'/srpspeed - установить значение скорости для профиля SampRP/Evolve;')
  324.                     imgui.Text(u8'/strpspeed - установить значение скорости для профиля Stage;')
  325.                     imgui.Text(u8'/prf0speed - установить значение скорости для профиля 0;')
  326.                     imgui.Text(u8'/prf1speed - установить значение скорости для профиля 1.')
  327.                     imgui.Text(u8'')
  328.                     end
  329.                     if imgui.CollapsingHeader(u8'Управление') then
  330.                         imgui.Text(u8'')
  331.                         imgui.Text(u8'1. Сядьте в машину.')
  332.                         imgui.Text(u8'2. Пропишите /fk для активации работы скрипта.')
  333.                         imgui.Text(u8'3. Выберите профиль скорости для корректной работы')
  334.                         imgui.Text(u8'скрипта на определенном сервере.')
  335.                         imgui.Text(u8'4. Зажмите L.Shift для включения режима полёта.')
  336.                         imgui.Text(u8'5. При зажатом шифте нажмите на цифру 2, чтобы')
  337.                         imgui.Text(u8'установить стартовую скорость.')
  338.                         imgui.Text(u8'6. Управление происходит клавишами w/a/s/d при зажатом шифте.')
  339.                         imgui.Text(u8'7. Поворот вокруг своей оси вправо/влево регулируется')
  340.                         imgui.Text(u8'Сочетанием клавиш "Shift + Alt + a/d".')
  341.                         imgui.Text(u8'Для того чтобы остановить т/с, нажмите цифру 1 при зажатом шифте.')
  342.                         imgui.Text(u8'Для того чтобы полететь назад, зажмите цифру 3 при нажатом шифте.')
  343.                         imgui.Text(u8'')
  344.                         imgui.Text(u8'Если возникли вопросы, пишите в vk.com/icanitrly')
  345.                         imgui.Text(u8'Или задавайте их под темой на blast.hk')
  346.                         imgui.Text(u8'blast.hk/threads/19329/')
  347.                         imgui.Text(u8'')
  348.                     end
  349.                     imgui.Text(u8'')
  350.                     if imgui.Button(u8"Закрыть окно", btn_size) then
  351.                         main_controls.v = not main_controls.v
  352.                     end
  353.                     imgui.End()
  354.                 end
  355.                 if main_sett.v then
  356.                     local speeds = inik.load(nil, "FluyKarr.luac.ini")
  357.                     imgui.SetNextWindowSize(imgui.ImVec2(470, 520), imgui.Cond.FirstUseEver)
  358.                     imgui.SetNextWindowPos(imgui.ImVec2(1220, 350), imgui.Cond.FirstUseEver)
  359.                     imgui.Begin('FluyKarr settings | V2.0 | Monitoring', main_sett)
  360.                     imgui.Text(u8'')
  361.                 imgui.Text(u8'Внимание! Единицы скорости не зависят от серверов!')
  362.                     imgui.Text(u8'1 единица скорости FK = 2 единицам скорости собейта!')
  363.                     imgui.Text(u8'0 = Default. Скорость: ' .. speeds.settings.speedf)
  364.                     imgui.Text(u8'1 = Diamond RP. Скорость: ' .. speeds.settings.speedDrp)
  365.                     imgui.Text(u8'2 = Advance RP. Скорость: ' .. speeds.settings.speedArp)
  366.                     imgui.Text(u8'3 = Samp RP. Скорость: ' .. speeds.settings.speedSrp)
  367.                     imgui.Text(u8'4 = Stage RP. Скорость: ' .. speeds.settings.speedStrp)
  368.                     imgui.Text(u8'5 = Профиль 0. Скорость: ' .. speeds.settings.speedProfile0)
  369.                 imgui.Text(u8'6 = Профиль 1. Скорость: ' .. speeds.settings.speedProfile1)
  370.                     imgui.Text(u8'')
  371.                     if imgui.Button(u8"Закрыть окно", btn_size) then
  372.                         main_sett.v = not main_sett.v
  373.                     end
  374.                     imgui.End()
  375.                 end
  376.     imgui.End()
  377.   end
  378.  
  379.  
  380. function img()
  381.   while true do
  382.     wait(0)
  383.     if wasKeyPressed(67) and wasKeyPressed(17) and not sampIsCursorActive() then -- активация по нажатию CTRL и C
  384.         main_window_state.v = not main_window_state.v -- переключаем статус активности окна, не забываем про .v
  385.     end
  386.     imgui.Process = main_window_state.v -- теперь значение imgui.Process всегда будет задаваться в зависимости от активности основного окна
  387.   end
  388. end
  389.  
  390. function apply_custom_style()
  391.     imgui.SwitchContext()
  392.     local style = imgui.GetStyle()
  393.     local colors = style.Colors
  394.     local clr = imgui.Col
  395.     local ImVec4 = imgui.ImVec4
  396.  
  397.     style.WindowRounding = 2.0
  398.     style.WindowTitleAlign = imgui.ImVec2(0.5, 0.84)
  399.     style.ChildWindowRounding = 2.0
  400.     style.FrameRounding = 2.0
  401.     style.ItemSpacing = imgui.ImVec2(5.0, 4.0)
  402.     style.ScrollbarSize = 13.0
  403.     style.ScrollbarRounding = 0
  404.     style.GrabMinSize = 8.0
  405.     style.GrabRounding = 1.0
  406.     colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, 1.00)
  407.     colors[clr.TextDisabled]           = ImVec4(0.50, 0.50, 0.50, 1.00)
  408.     colors[clr.WindowBg]               = ImVec4(0.03, 0.07, 0.14, 0.7)
  409.     colors[clr.ChildWindowBg]          = ImVec4(1.00, 1.00, 1.00, 0.00)
  410.     colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94)
  411.     colors[clr.ComboBg]                = colors[clr.PopupBg]
  412.     colors[clr.Border]                 = ImVec4(0.43, 0.43, 0.50, 0.50)
  413.     colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
  414.     colors[clr.FrameBg]                = ImVec4(0.16, 0.29, 0.48, 0.54)
  415.     colors[clr.FrameBgHovered]         = ImVec4(0.26, 0.59, 0.98, 0.40)
  416.     colors[clr.FrameBgActive]          = ImVec4(0.26, 0.59, 0.98, 0.67)
  417.     colors[clr.TitleBg]                = ImVec4(0.04, 0.04, 0.04, 1.00)
  418.     colors[clr.TitleBgActive]          = ImVec4(0.16, 0.29, 0.48, 1.00)
  419.     colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51)
  420.     colors[clr.MenuBarBg]              = ImVec4(0.14, 0.14, 0.14, 1.00)
  421.     colors[clr.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
  422.     colors[clr.ScrollbarGrab]          = ImVec4(0.31, 0.31, 0.31, 1.00)
  423.     colors[clr.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
  424.     colors[clr.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
  425.     colors[clr.CheckMark]              = ImVec4(0.26, 0.59, 0.98, 1.00)
  426.     colors[clr.SliderGrab]             = ImVec4(0.24, 0.52, 0.88, 1.00)
  427.     colors[clr.SliderGrabActive]       = ImVec4(0.26, 0.59, 0.98, 1.00)
  428.     colors[clr.Button]                 = ImVec4(0.26, 0.59, 0.98, 0.40)
  429.     colors[clr.ButtonHovered]          = ImVec4(0.26, 0.59, 0.98, 0.70)
  430.     colors[clr.ButtonActive]           = ImVec4(0.06, 0.53, 0.98, 1.00)
  431.     colors[clr.Header]                 = ImVec4(0.26, 0.59, 0.98, 0.31)
  432.     colors[clr.HeaderHovered]          = ImVec4(0.26, 0.59, 0.98, 0.80)
  433.     colors[clr.HeaderActive]           = ImVec4(0.26, 0.59, 0.98, 1.00)
  434.     colors[clr.Separator]              = colors[clr.Border]
  435.     colors[clr.SeparatorHovered]       = ImVec4(0.26, 0.59, 0.98, 0.78)
  436.     colors[clr.SeparatorActive]        = ImVec4(0.26, 0.59, 0.98, 1.00)
  437.     colors[clr.ResizeGrip]             = ImVec4(0.26, 0.59, 0.98, 0.25)
  438.     colors[clr.ResizeGripHovered]      = ImVec4(0.26, 0.59, 0.98, 0.67)
  439.     colors[clr.ResizeGripActive]       = ImVec4(0.26, 0.59, 0.98, 0.95)
  440.     colors[clr.CloseButton]            = ImVec4(0.41, 0.41, 0.41, 0.50)
  441.     colors[clr.CloseButtonHovered]     = ImVec4(0.98, 0.39, 0.36, 1.00)
  442.     colors[clr.CloseButtonActive]      = ImVec4(0.98, 0.39, 0.36, 1.00)
  443.     colors[clr.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00)
  444.     colors[clr.PlotLinesHovered]       = ImVec4(1.00, 0.43, 0.35, 1.00)
  445.     colors[clr.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
  446.     colors[clr.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
  447.     colors[clr.TextSelectedBg]         = ImVec4(0.26, 0.59, 0.98, 0.35)
  448.     colors[clr.ModalWindowDarkening]   = ImVec4(0.80, 0.80, 0.80, 0.35)
  449. end
  450. apply_custom_style()
  451.  
  452. function defspeed(arg)
  453. if tonumber(arg) ~= nil then
  454. local speeds = inik.load(nil, "FluyKarr.luac.ini")
  455. sampAddChatMessage((string.format("[FKarr]{d5dedd} DefSpeed | Было поставлено значение скорости: %s", arg)), 0x30F867)
  456. speeds.settings.speedf = arg
  457. inik.save(speeds)
  458. else
  459. sampAddChatMessage("[FKarr] {d5dedd}Ты серьезно хочешь так сделать?", 0xF86630)
  460. end
  461. end
  462.  
  463. function drpspeed(arg)
  464. if tonumber(arg) ~= nil then
  465. local speeds = inik.load(nil, "FluyKarr.luac.ini")
  466. sampAddChatMessage((string.format("[FKarr]{d5dedd} DrpSpeed | Было поставлено значение скорости: %s", arg)), 0x30F867)
  467. speeds.settings.speedDrp = arg
  468. inik.save(speeds)
  469. else
  470. sampAddChatMessage("[FKarr] {d5dedd}Ты серьезно хочешь так сделать?", 0xF86630)
  471. end
  472. end
  473.  
  474. function arpspeed(arg)
  475. if tonumber(arg) ~= nil then
  476. local speeds = inik.load(nil, "FluyKarr.luac.ini")
  477. sampAddChatMessage((string.format("[FKarr]{d5dedd} ArpSpeed | Было поставлено значение скорости: %s", arg)), 0x30F867)
  478. speeds.settings.speedArp = arg
  479. inik.save(speeds)
  480. else
  481. sampAddChatMessage("[FKarr] {d5dedd}Ты серьезно хочешь так сделать?", 0xF86630)
  482. end
  483. end
  484.  
  485. function srpspeed(arg)
  486. if tonumber(arg) ~= nil then
  487. local speeds = inik.load(nil, "FluyKarr.luac.ini")
  488. sampAddChatMessage((string.format("[FKarr]{d5dedd} SrpSpeed | Было поставлено значение скорости: %s", arg)), 0x30F867)
  489. speeds.settings.speedSrp = arg
  490. inik.save(speeds)
  491. else
  492. sampAddChatMessage("[FKarr] {d5dedd}Ты серьезно хочешь так сделать?", 0xF86630)
  493. end
  494. end
  495.  
  496. function strpspeed(arg)
  497. if tonumber(arg) ~= nil then
  498. local speeds = inik.load(nil, "FluyKarr.luac.ini")
  499. sampAddChatMessage((string.format("[FKarr]{d5dedd} StagSpeed | Было поставлено значение скорости: %s", arg)), 0x30F867)
  500. speeds.settings.speedStrp = arg
  501. inik.save(speeds)
  502. else
  503. sampAddChatMessage("[FKarr] {d5dedd}Ты серьезно хочешь так сделать?", 0xF86630)
  504. end
  505. end
  506.  
  507. function profileN(arg)
  508. if tonumber(arg) ~= nil then
  509. local speeds = inik.load(nil, "FluyKarr.luac.ini")
  510. sampAddChatMessage((string.format("[FKarr]{d5dedd} Profile0Speed | Было поставлено значение скорости: %s", arg)), 0x30F867)
  511. speeds.settings.speedProfile0 = arg
  512. inik.save(speeds)
  513. else
  514. sampAddChatMessage("[FKarr] {d5dedd}Ты серьезно хочешь так сделать?", 0xF86630)
  515. end
  516. end
  517.  
  518. function profileT(arg)
  519. if tonumber(arg) ~= nil then
  520. local speeds = inik.load(nil, "FluyKarr.luac.ini")
  521. sampAddChatMessage((string.format("[FKarr]{d5dedd} Profile1Speed | Было поставлено значение скорости: %s", arg)), 0x30F867)
  522. speeds.settings.speedProfile1 = arg
  523. inik.save(speeds)
  524. else
  525. sampAddChatMessage("[FKarr] {d5dedd}Ты серьезно хочешь так сделать?", 0xF86630)
  526. end
  527. end
Advertisement
Add Comment
Please, Sign In to add comment