Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script_version(10)
- local imgui = require 'imgui'
- local encoding = require 'encoding'
- local inicfg = require 'inicfg'
- local hook = require 'lib.samp.events'
- encoding.default = 'CP1251'
- u8 = encoding.UTF8
- local mainIni = inicfg.load({
- config =
- {
- lic = false,
- trade = false,
- tlf = false,
- arm = false,
- msk = false,
- smk = false,
- time = false,
- lock = false,
- jlock = false,
- fcar = false,
- recar = false,
- key = false,
- vr = false,
- aut = false,
- abc = false,
- acd = false,
- mbc = false,
- at = false,
- act = false,
- waitb = 10000,
- zz = false,
- pizza = false,
- vip = false,
- drugs = false,
- flood = false,
- olock = false,
- chatsms = " ",
- rtsms = " ",
- famsms = " ",
- smsbc = " ",
- smsvip = " ",
- chasi = " "
- }
- }, "ARZ Helper")
- local lic = imgui.ImBool(mainIni.config.lic)
- local trade = imgui.ImBool(mainIni.config.trade)
- local tlf = imgui.ImBool(mainIni.config.tlf)
- local arm = imgui.ImBool(mainIni.config.arm)
- local msk = imgui.ImBool(mainIni.config.msk)
- local smk = imgui.ImBool(mainIni.config.smk)
- local time = imgui.ImBool(mainIni.config.time)
- local lock = imgui.ImBool(mainIni.config.lock)
- local jlock = imgui.ImBool(mainIni.config.jlock)
- local fcar = imgui.ImBool(mainIni.config.fcar)
- local recar = imgui.ImBool(mainIni.config.recar)
- local key = imgui.ImBool(mainIni.config.key)
- local vr = imgui.ImBool(mainIni.config.vr)
- local aut = imgui.ImBool(mainIni.config.aut)
- local abc = imgui.ImBool(mainIni.config.abc)
- local zz = imgui.ImBool(mainIni.config.zz)
- local waitb = imgui.ImInt(mainIni.config.waitb)
- local olock = imgui.ImBool(mainIni.config.olock)
- local acd = imgui.ImBool(mainIni.config.acd)
- local pizza = imgui.ImBool(mainIni.config.pizza)
- local at = imgui.ImBool(mainIni.config.at)
- local flood = imgui.ImBool(mainIni.config.flood)
- local vip = imgui.ImBool(mainIni.config.vip)
- local drugs = imgui.ImBool(mainIni.config.drugs)
- local smsbc = imgui.ImBuffer(''..mainIni.config.smsbc, 500)
- local chatsms = imgui.ImBuffer(''..mainIni.config.chatsms, 500)
- local rtsms = imgui.ImBuffer(''..mainIni.config.rtsms, 500)
- local famsms = imgui.ImBuffer(''..mainIni.config.famsms, 500)
- local smsvip = imgui.ImBuffer(''..mainIni.config.smsvip, 500)
- local chasi = imgui.ImBuffer(''..mainIni.config.chasi, 500)
- local mbc = imgui.ImBool(mainIni.config.mbc)
- local status = inicfg.load(mainIni, 'ARZ Helper.ini')
- if not doesFileExist('moonloader/config/ARZ Helper.ini') then inicfg.save(mainIni, 'ARZ Helper.ini') end
- local main_window_state = imgui.ImBool(false)
- function imgui.OnDrawFrame()
- imgui.ShowCursor = main_window_state.v
- if main_window_state.v then
- imgui.SetNextWindowSize(imgui.ImVec2(700, 520), imgui.Cond.FirstUseEver)
- if not window_pos then
- ScreenX, ScreenY = getScreenResolution()ScreenX, ScreenY = getScreenResolution()
- imgui.SetNextWindowPos(imgui.ImVec2(ScreenX / 2 , ScreenY / 2), imgui.Cond.FirsUseEver, imgui.ImVec2(0.5, 0.5))
- end
- imgui.Begin('By Fyger | ARZ Helper', main_window_state, imgui.WindowFlags.NoResize + imgui.WindowFlags.NoCollapse + imgui.WindowFlags.NoScrollbar)
- imgui.Text(u8"VK Author: @mq228_suqa1488 | Сокращенные команды: /findihouse - /fh, /findibiz - /fbiz")
- imgui.BeginChild("##g_sexbar", imgui.ImVec2(300, 120), true, imgui.WindowFlags.NoScrollbar)
- imgui.Checkbox(u8"Показ скилов ближайшему игроку", lic)
- imgui.SameLine()
- imgui.TextQuestion(u8'При нажатии клавиш ALT + 1 вы покажите лицензии ближайшему игроку')
- imgui.Checkbox(u8"Торговля ближайшему игроку", trade)
- imgui.SameLine()
- imgui.TextQuestion(u8'При нажатии клавиш ALT + 2 вы предложите торговлю ближайшему игроку')
- imgui.Checkbox(u8"Телефон", tlf)
- imgui.SameLine()
- imgui.TextQuestion(u8"При нажатии на клавишу P у вас откроется телефон" )
- imgui.SameLine()
- imgui.Checkbox(u8"Удаление хуйни", flood)
- imgui.SameLine()
- imgui.TextQuestion(u8"Данная функция удалит из чата такие сообщения как: пригласите друга, со склада sf выехал матовоз и т.д" )
- imgui.EndChild()
- imgui.BeginChild("##gay_bar", imgui.ImVec2(300, 120), true, imgui.WindowFlags.NoScrollbar)
- imgui.Checkbox(u8"Бронежилет", arm)
- imgui.SameLine()
- imgui.TextQuestion(u8"При сочетании клавиш ARM у вас появится бронежилет")
- imgui.SameLine()
- imgui.Checkbox(u8"Titan VIP смс", vip)
- imgui.SameLine()
- imgui.TextQuestion(u8"Как только какой то игрок купит Титан Вип - скрипт отправит в чат это сообщение")
- imgui.Checkbox(u8"Маска", msk)
- imgui.SameLine()
- imgui.TextQuestion(u8"При сочетании клавиш MASK у вас появится маска")
- imgui.SameLine()
- imgui.PushItemWidth(170)
- imgui.InputText(u8"", smsvip)
- imgui.Checkbox(u8"Сигарета", smk)
- imgui.SameLine()
- imgui.TextQuestion(u8"При сочетании клавиш SMK у вас появится сигарета")
- imgui.SameLine()
- imgui.Checkbox(u8"Наркотики", drugs)
- imgui.SameLine()
- imgui.TextQuestion(u8"При сочетании клавиш alt + 1/2/3 (нумпад) вы используете наркотики")
- imgui.EndChild()
- imgui.BeginChild("##bar_bar", imgui.ImVec2(300, 120), true, imgui.WindowFlags.NoScrollbar)
- imgui.Checkbox(u8"Часы", time)
- imgui.SameLine()
- imgui.PushItemWidth(70)
- imgui.InputText(u8"Отыгровка часов", chasi)
- imgui.SameLine()
- imgui.TextQuestion(u8"При сочетании клавиш EZ вы посмотрите на часы")
- imgui.Checkbox(u8"Закрытие транспорта", lock)
- imgui.SameLine()
- imgui.TextQuestion(u8"При нажатии на клавишу L вы закроете/откроете свой транспорт")
- imgui.Checkbox(u8"Закрытие аренды", jlock)
- imgui.SameLine()
- imgui.TextQuestion(u8"При сочитании клвиш JL вы закроете/откроете свой арендованный транспорт")
- imgui.EndChild()
- if imgui.Button(u8'Сохранить настройки',imgui.ImVec2(150,65)) then
- mainIni.config.lic = lic.v
- mainIni.config.trade = trade.v
- mainIni.config.tlf = tlf.v
- mainIni.config.arm = arm.v
- mainIni.config.msk = msk.v
- mainIni.config.smk = smk.v
- mainIni.config.time = time.v
- mainIni.config.lock = lock.v
- mainIni.config.jlock = jlock.v
- mainIni.config.fcar = fcar.v
- mainIni.config.recar = recar.v
- mainIni.config.key = key.v
- mainIni.config.aut = aut.v
- mainIni.config.abc = abc.v
- mainIni.config.acd = acd.v
- mainIni.config.mbc = mbc.v
- mainIni.config.at = at.v
- mainIni.config.smsbc = smsbc.v
- mainIni.config.chatsms = chatsms.v
- mainIni.config.rtsms = rtsms.v
- mainIni.config.famsms = famsms.v
- mainIni.config.zz = zz.v
- mainIni.config.flood = flood.v
- mainIni.config.olock = olock.v
- mainIni.config.pizza = pizza.v
- mainIni.config.vip = vip.v
- mainIni.config.smsvip = smsvip.v
- mainIni.config.chasi = chasi.v
- mainIni.config.drugs = drugs.v
- mainIni.config.waitb = waitb.v
- inicfg.save(mainIni, 'ARZ Helper.ini')
- end
- imgui.SetCursorPos(imgui.ImVec2(325, 61))
- imgui.BeginChild("##ear_bar", imgui.ImVec2(365, 120), true, imgui.WindowFlags.NoScrollbar)
- imgui.Checkbox(u8"Заправить авто", fcar)
- imgui.SameLine()
- imgui.TextQuestion(u8"При сочитании клвишь CAN вы заправите транспорт используя канистру")
- imgui.SameLine()
- imgui.Checkbox(u8"Cкип диалога о ЗЗ", zz)
- imgui.SameLine()
- imgui.TextQuestion(u8"Как только скрипт увидит диалог с текстом •запрещено дратся• - он его пропустит")
- imgui.Checkbox(u8"Починить авто", recar)
- imgui.SameLine()
- imgui.TextQuestion(u8"При сочитании клвишь RECAR вы почините транспорт используя ремкомплект")
- imgui.SameLine()
- imgui.Checkbox(u8"Cкип диалога о пицце", pizza)
- imgui.SameLine()
- imgui.TextQuestion(u8"Как только скрипт увидит диалог с текстом •вы успешно положили пиццу• - он его пропустит")
- imgui.Checkbox(u8"Ключи от авто", key)
- imgui.SameLine()
- imgui.TextQuestion(u8"При нажатии на клавиру K вы вставите/заберете ключи")
- imgui.SameLine()
- imgui.Checkbox(u8"Закрытие орг. т/с", olock)
- imgui.SameLine()
- imgui.TextQuestion(u8"При сочитании клавиш OL вы откроете/закроете организационный транспорт")
- imgui.EndChild()
- imgui.SetCursorPos(imgui.ImVec2(325, 189))
- imgui.BeginChild("##g_leftbar", imgui.ImVec2(365, 165), true, imgui.WindowFlags.NoScrollbar)
- imgui.Checkbox(u8"Авто скип ответа на репорт/мут", aut)
- imgui.SameLine()
- imgui.TextQuestion(u8"Как только скрипт увидит ответ администратора/диалог с мутом он пропустит диалог")
- imgui.Text(u8"Активация: /Piar")
- imgui.SameLine()
- imgui.SliderInt(u8"Задержка", waitb, 10000, 60000)
- imgui.InputText(u8"Реклама в /vr", chatsms)
- imgui.InputText(u8"Доп. пиар", rtsms)
- imgui.InputText(u8"Доп пиар", famsms)
- imgui.EndChild()
- imgui.SetCursorPos(imgui.ImVec2(325, 360))
- imgui.BeginChild("##g_pftbar", imgui.ImVec2(365, 150), true, imgui.WindowFlags.NoScrollbar)
- imgui.Checkbox(u8"Авто закрытие дверей авто", acd)
- imgui.SameLine()
- imgui.TextQuestion(u8"Как только скрипт увидит что вы словили авто по госсу он автоматически закроет двери авто")
- imgui.Checkbox(u8"Сообщение после ловли", mbc)
- imgui.SameLine()
- imgui.TextQuestion(u8"Это сообщение отправится после ловли")
- imgui.InputText(u8"Сообщение", smsbc)
- imgui.Checkbox(u8"Авто тайм после ловли", at)
- imgui.SameLine()
- imgui.TextQuestion(u8"После удачной ловли скрипт сам пропишет /time с отыгровкой")
- imgui.EndChild()
- imgui.SetCursorPos(imgui.ImVec2(175, 445))
- if imgui.Button(u8"Перезагрузить скрипт", imgui.ImVec2(140,65)) then
- thisScript():reload()
- end
- imgui.End()
- end
- end
- function main()
- while not isSampAvailable() do wait(0) end
- autoupdate("https://www.dropbox.com/s/pjfzgpgu7ndrgem/huita.json?dl=1", '['..string.upper(thisScript().name)..']: ', "https://www.dropbox.com/s/jt5k96otghj3b5g/ARZ_Helper.lua?dl=1")
- sampRegisterChatCommand("piar", function()
- act = not act; sampAddChatMessage(act and '{01A0E9}Реклама включена!' or '{01A0E9}Реклама выключена!', -1)
- if act then
- piar()
- end
- end)
- sampRegisterChatCommand("arzh", function()
- main_window_state.v = not main_window_state.v
- end)
- sampRegisterChatCommand("arzobnova",obnova)
- sampRegisterChatCommand('fh', function(num)
- sampSendChat('/findihouse '..num)
- end)
- sampRegisterChatCommand('fbiz', function(num)
- sampSendChat('/findibiz '..num)
- end)
- sampAddChatMessage("{01A0E9}[ARZ Helper] {ffffff}Загружен!",-1)
- while true do
- wait(0)
- imgui.Process = main_window_state.v
- if lic.v and wasKeyPressed(0x31) and isKeyDown(0x12) then
- local veh, ped = storeClosestEntities(PLAYER_PED)
- local _, id = sampGetPlayerIdByCharHandle(ped)
- if id then
- sampSendChat('/showskill '..id)
- end
- end
- if trade.v and wasKeyPressed(0x32) and isKeyDown(0x12) then
- local veh, ped = storeClosestEntities(PLAYER_PED)
- local _, id = sampGetPlayerIdByCharHandle(ped)
- if _ then
- sampSendChat('/trade '..id)
- end
- end
- if tlf.v and wasKeyPressed(0x50) and not sampIsCursorActive() then
- sampSendChat("/phone")
- end
- if arm.v then
- if testCheat("arm") and not sampIsChatInputActive() then
- sampSendChat("/me используя магию надел бронежилет")
- sampSendChat("/armour")
- end
- end
- if smk.v then
- if testCheat("smk") then
- sampSendChat("/smoke")
- end
- end
- if msk.v then
- if testCheat("msk") and not sampIsCursorActive() then
- sampSendChat("/mask")
- end
- end
- if time.v then
- if testCheat("ez") and not sampIsCursorActive() then
- sampSendChat(u8:decode(chasi.v))
- wait(1200)
- sampSendChat("/time")
- wait(1200)
- sampSendChat ("/do На часах "..os.date('%H:%M:%S'))
- end
- end
- if olock.v and not sampIsCursorActive() then
- if testCheat("ol") then
- sampSendChat("/olock")
- end
- end
- if jlock.v and not sampIsChatInputActive() then
- if testCheat("jl") then
- sampSendChat("/jlock")
- end
- end
- if lock.v and not sampIsChatInputActive() then
- if testCheat("l") then
- sampSendChat("/lock")
- end
- end
- if drugs.v and not sampIsCursorActive() then
- if wasKeyPressed(0x61) and isKeyDown(0x12) then
- sampSendChat("/usedrugs 1")
- end
- if wasKeyPressed(0x62) and isKeyDown(0x12) then
- sampSendChat("/usedrugs 2")
- end
- if wasKeyPressed(0x63) and isKeyDown(0x12) then
- sampSendChat("/usedrugs 3")
- end
- end
- if fcar.v and not sampIsCursorActive() then
- if testCheat("can") then
- sampSendChat("/fillcar")
- end
- end
- if recar.v and not sampIsCursorActive() then
- if testCheat("recar") then
- sampSendChat("/repcar")
- end
- end
- if key.v and not sampIsCursorActive() then
- if testCheat("k") then
- sampSendChat("/key")
- end
- end
- end
- end
- function hook.onServerMessage(color, text)
- if acd.v then
- if text:find("Поздравляем! Теперь этот транспорт принадлежит вам!") and not text:find('говорит') and not text:find('- |') then
- sampSendChat('/lock')
- end
- end
- if mbc.v then
- if text:find("Поздравляем! Теперь этот транспорт принадлежит вам!") or text:find("(.-)Поздравляю! Теперь этот дом ваш!(.-)") then
- lua_thread.create(function()
- wait(500)
- sampSendChat(u8:decode(smsbc.v))
- end)
- end
- end
- if at.v then
- if text:find("Поздравляем! Теперь этот транспорт принадлежит вам!") or text:find("(.-)Поздравляю! Теперь этот дом ваш!(.-)") and not text:find('говорит') and not text:find('- |') then
- lua_thread.create(function()
- if mbc.v then
- wait(5000)
- end
- sampSendChat("/me взглянул на часы с гравировкой •Топ ловец•")
- sampSendChat("/time")
- wait(1200)
- sampSendChat ("/do На часах "..os.date('%H:%M:%S'))
- end)
- end
- end
- if vip.v then
- if text:find 'Игрок (.-) приобрел Titan VIP' and not text:find('говорит') and not text:find('- |') then
- sampSendChat(u8:decode(smsvip.v))
- end
- end
- if flood.v then
- if text:find("~~~~~~~~~~~~~~~~~~~~~~~~~~") then
- return false
- end
- if text:find("- Основные команды") and not text:find("говорит") then
- return false
- end
- if text:find("- Пригласи друга") and not text:find("говорит") then
- return false
- end
- if text:find("- Донат и получение") and not text:find("говорит") then
- return false
- end
- if text:find("Со склада армии") and not text:find("говорит") then
- return false
- end
- if text:find("Между использованием предметов") and not text:find("говорит") then
- return false
- end
- if text:find("начал работу новый") and not text:find("говорит") then
- return false
- end
- if text:find("вы сможете получить") and not text:find("говорит") then
- return false
- end
- if text:find("выехал матовоз") and not text:find("говорит") then
- return false
- end
- end
- end
- function hook.onShowDialog(dialogId, dialogStyle, dialogTitle, okButtonText, cancelButtonText, dialogText)
- if aut.v then
- if dialogText:find("Вы получили бан") then
- return false
- end
- if dialogId == 1333 then
- return false
- end
- if dialogId == 1332 then
- return false
- end
- end
- if zz.v then
- if dialogText:find("В этом месте запрещено") then
- return false
- end
- end
- if pizza.v then
- if dialogText:find("Вы успешно положили") then
- return false
- end
- end
- if tlf.v then
- if dialogId == 1000 then
- setVirtualKeyDown(13, false)
- end
- end
- end
- function piar()
- lua_thread.create(function()
- if act then
- sampSendChat(u8:decode(chatsms.v))
- wait(1200)
- sampSendChat(u8:decode(rtsms.v))
- wait(1200)
- sampSendChat(u8:decode(famsms.v))
- wait (waitb.v)
- return true
- end
- end)
- end
- function apply_custom_style()
- if not state then
- 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(15, 15)
- style.WindowRounding = 5.0
- style.FramePadding = ImVec2(5, 5)
- style.FrameRounding = 4.0
- style.ItemSpacing = ImVec2(12, 8)
- style.ItemInnerSpacing = ImVec2(8, 6)
- style.IndentSpacing = 25.0
- style.ScrollbarSize = 15.0
- style.ScrollbarRounding = 9.0
- style.GrabMinSize = 5.0
- style.GrabRounding = 3.0
- colors[clr.Text] = ImVec4(0.80, 0.80, 0.83, 1.00)
- colors[clr.TextDisabled] = ImVec4(0.24, 0.23, 0.29, 1.00)
- colors[clr.WindowBg] = ImVec4(0.06, 0.05, 0.07, 1.00)
- colors[clr.ChildWindowBg] = ImVec4(0.07, 0.07, 0.09, 1.00)
- colors[clr.PopupBg] = ImVec4(0.07, 0.07, 0.09, 1.00)
- colors[clr.Border] = ImVec4(0.80, 0.80, 0.83, 0.88)
- colors[clr.BorderShadow] = ImVec4(0.92, 0.91, 0.88, 0.00)
- colors[clr.FrameBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
- colors[clr.FrameBgHovered] = ImVec4(0.24, 0.23, 0.29, 1.00)
- colors[clr.FrameBgActive] = ImVec4(0.56, 0.56, 0.58, 1.00)
- colors[clr.TitleBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
- colors[clr.TitleBgCollapsed] = ImVec4(1.00, 0.98, 0.95, 0.75)
- colors[clr.TitleBgActive] = ImVec4(0.07, 0.07, 0.09, 1.00)
- colors[clr.MenuBarBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
- colors[clr.ScrollbarBg] = ImVec4(0.10, 0.09, 0.12, 1.00)
- colors[clr.ScrollbarGrab] = ImVec4(0.80, 0.80, 0.83, 0.31)
- colors[clr.ScrollbarGrabHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
- colors[clr.ScrollbarGrabActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
- colors[clr.ComboBg] = ImVec4(0.19, 0.18, 0.21, 1.00)
- colors[clr.CheckMark] = ImVec4(0.80, 0.80, 0.83, 0.31)
- colors[clr.SliderGrab] = ImVec4(0.80, 0.80, 0.83, 0.31)
- colors[clr.SliderGrabActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
- colors[clr.Button] = ImVec4(0.10, 0.09, 0.12, 1.00)
- colors[clr.ButtonHovered] = ImVec4(0.24, 0.23, 0.29, 1.00)
- colors[clr.ButtonActive] = ImVec4(0.56, 0.56, 0.58, 1.00)
- colors[clr.Header] = ImVec4(0.10, 0.09, 0.12, 1.00)
- colors[clr.HeaderHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
- colors[clr.HeaderActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
- colors[clr.ResizeGrip] = ImVec4(0.00, 0.00, 0.00, 0.00)
- colors[clr.ResizeGripHovered] = ImVec4(0.56, 0.56, 0.58, 1.00)
- colors[clr.ResizeGripActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
- colors[clr.CloseButton] = ImVec4(0.40, 0.39, 0.38, 0.16)
- colors[clr.CloseButtonHovered] = ImVec4(0.40, 0.39, 0.38, 0.39)
- colors[clr.CloseButtonActive] = ImVec4(0.40, 0.39, 0.38, 1.00)
- colors[clr.PlotLines] = ImVec4(0.40, 0.39, 0.38, 0.63)
- colors[clr.PlotLinesHovered] = ImVec4(0.25, 1.00, 0.00, 1.00)
- colors[clr.PlotHistogram] = ImVec4(0.40, 0.39, 0.38, 0.63)
- colors[clr.PlotHistogramHovered] = ImVec4(0.25, 1.00, 0.00, 1.00)
- colors[clr.TextSelectedBg] = ImVec4(0.25, 1.00, 0.00, 0.43)
- colors[clr.ModalWindowDarkening] = ImVec4(1.00, 0.98, 0.95, 0.73)
- end
- end
- apply_custom_style()
- function imgui.TextQuestion(text)
- imgui.TextDisabled('(?)')
- if imgui.IsItemHovered() then
- imgui.BeginTooltip()
- imgui.PushTextWrapPos(450)
- imgui.TextUnformatted(text)
- imgui.PopTextWrapPos()
- imgui.EndTooltip()
- end
- end
- function autoupdate(json_url, prefix, url)
- local dlstatus = require('moonloader').download_status
- local json = getWorkingDirectory() .. '\\'..thisScript().name..'-version.json'
- if doesFileExist(json) then os.remove(json) end
- downloadUrlToFile(json_url, json,
- function(id, status, p1, p2)
- if status == dlstatus.STATUSEX_ENDDOWNLOAD then
- if doesFileExist(json) then
- local f = io.open(json, 'r')
- if f then
- local info = decodeJson(f:read('*a'))
- updatelink = info.updateurl
- updateversion = info.latest
- f:close()
- os.remove(json)
- if updateversion ~= thisScript().version then
- lua_thread.create(function(prefix)
- local dlstatus = require('moonloader').download_status
- local color = -1
- sampAddChatMessage((prefix..'Обнаружено обновление. Пытаюсь обновиться c '..thisScript().version..' на '..updateversion), color)
- wait(250)
- downloadUrlToFile(updatelink, thisScript().path,
- function(id3, status1, p13, p23)
- if status1 == dlstatus.STATUS_DOWNLOADINGDATA then
- print(string.format('Загружено %d из %d.', p13, p23))
- elseif status1 == dlstatus.STATUS_ENDDOWNLOADDATA then
- print('Загрузка обновления завершена.')
- sampAddChatMessage((prefix..'{01A0E9}Обновление завершено!'), color)
- sampAddChatMessage((prefix..'Пропишите {01A0E9}/arzobnova {ffffff}что бы узнать подробнее!'), color)
- goupdatestatus = true
- lua_thread.create(function() wait(500) thisScript():reload() end)
- end
- if status1 == dlstatus.STATUSEX_ENDDOWNLOAD then
- if goupdatestatus == nil then
- sampAddChatMessage((prefix..'Обновление прошло неудачно. Запускаю устаревшую версию..'), color)
- update = false
- end
- end
- end
- )
- end, prefix
- )
- else
- update = false
- sampAddChatMessage("{01A0E9}[ARZ Helper] {ffffff}Обновление не требуется", -1)
- end
- end
- else
- print('v'..thisScript().version..': Не могу проверить обновление. Смиритесь или проверьте самостоятельно на '..url)
- update = false
- end
- end
- end
- )
- while update ~= false do wait(100) end
- end
- function obnova()
- sampAddChatMessage("Добавил закрытие организационного транспорта, и удаление всякой хуйни из чата",-1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement