курсор имгуи

darkmeleee

Участник
Автор темы
98
12
Версия MoonLoader
.026-beta
как сделать чтобы в одном имгуи не требовался курсор(не вызывался), а в другом вызывался?
 
Решение
Lua:
script_name("PhoTools")
script_authors("Chicago")
script_version("3")
script_dependencies("SAMPFUNCS")


require"lib.moonloader"
require"lib.sampfuncs"



local keys = require "vkeys"
local ev = require 'lib.samp.events';
local tag = "[PhoTools]:"
local imgui = require 'imgui'
local text_buffer = imgui.ImBuffer(256)
local admlvl = imgui.ImBuffer(256)
local report_answer = imgui.ImBuffer(256)
local encoding = require 'encoding' -- загружаем
local imguiWindow, authorMenu, statsMenu, dialogMenu, testMenu = imgui.ImBool(false), imgui.ImBool(false), imgui.ImBool(false), imgui.ImBool(false),imgui.ImBool(false)
encoding.default = 'CP1251' -- указываем кодировку по умолчанию, она должна совпадать с кодировкой файла. CP1251 - это Windows-1251
u8 =...

darkmeleee

Участник
Автор темы
98
12
ну на
фвф:
script_name("PhoTools")
script_authors("Chicago")
script_version("3")
script_dependencies("SAMPFUNCS")


require"lib.moonloader"
require"lib.sampfuncs"



local keys = require "vkeys"
local ev = require 'lib.samp.events';
local tag = "[PhoTools]:"
local imgui = require 'imgui'
local text_buffer = imgui.ImBuffer(256)
local admlvl = imgui.ImBuffer(256)
local report_answer = imgui.ImBuffer(256)
local encoding = require 'encoding' -- загружаем
local imguiWindow, authorMenu, statsMenu, dialogMenu, testMenu = imgui.ImBool(false), imgui.ImBool(false), imgui.ImBool(false), imgui.ImBool(false),imgui.ImBool(false)
encoding.default = 'CP1251' -- указываем кодировку по умолчанию, она должна совпадать с кодировкой файла. CP1251 - это Windows-1251
u8 = encoding.UTF8 -- и создаём короткий псевдоним для кодировщика UTF-8
local inicfg = require 'inicfg'
local dialogID = ""
local dialogText = ""
local shablon = {
    settings = {
        admpass = "",
        lvladm = "",
        gm = 0,
        color_admchat = "",
    }
}
local fa = require "faicons"
local fa_glyph_ranges = imgui.ImGlyphRanges({fa.min_range, fa.max_range})

function imgui.BeforeDrawFrame()
    if fa_font == nil then
        local font_config = imgui.ImFontConfig() -- to use 'imgui.ImFontConfig.new()' on error
        font_config.MergeMode = true
        fa_font = imgui.GetIO().Fonts:AddFontFromFileTTF('moonloader/resource/fonts/fontawesome-webfont.ttf', 14.0, font_config, fa_glyph_ranges)
    end
end


local imguiSettings, imguiColor, imguiAuthor = false, false, false

local isGmNum = 0
local mem = require "memory"
    
local isGm = imgui.ImBool(true)


local table1

local directIni = "moonloader\\settings.ini"

local mainIni = inicfg.load(nil, directIni)
local initable = {
    tabl = {
        day = os.date("%a"),
        time = 00,
        hours = 00,
        second = 00,
        afk_time = 00,
        afk_hours = 00,
        afk_second = 00
        }

    }
local seconds = 0
local afk_seconds = 0
local afk_min = 0
local afk_hours = 0
local tables
local color = imgui.ImFloat3(1.0, 1.0, 1.0)
function WorkInBackground(work)
        local memory = require 'memory'
        if work then -- on
            memory.setuint8(7634870, 1)
            memory.setuint8(7635034, 1)
            memory.fill(7623723, 144, 8)
            memory.fill(5499528, 144, 6)
        else -- off
            memory.setuint8(7634870, 0)
            memory.setuint8(7635034, 0)
            memory.hex2bin('5051FF1500838500', 7623723, 8)
            memory.hex2bin('0F847B010000', 5499528, 6)
        end
    end





-- 177 185

local tag = '[PhoenixTools]:'
local main_color = 0x5290CE
local white_color = "{FFFFFF}"
local admin_color = 0
local checked_radio = imgui.ImInt(1)
local combo_select = imgui.ImInt(0)
local checked_box = imgui.ImBool()
local combo_select = imgui.ImBool()
local sw, sh = getScreenResolution()

local jalobi = 0

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 = 15.0
    style.FramePadding = ImVec2(5, 5)
    style.ItemSpacing = ImVec2(12, 8)
    style.ItemInnerSpacing = ImVec2(8, 6)
    style.IndentSpacing = 25.0
    style.ScrollbarSize = 15.0
    style.ScrollbarRounding = 15.0
    style.GrabMinSize = 15.0
    style.GrabRounding = 7.0
    style.ChildWindowRounding = 8.0
    style.FrameRounding = 6.0
    
 
      colors[clr.Text] = ImVec4(0.95, 0.96, 0.98, 1.00)
      colors[clr.TextDisabled] = ImVec4(0.36, 0.42, 0.47, 1.00)
      colors[clr.WindowBg] = ImVec4(0.11, 0.15, 0.17, 1.00)
      colors[clr.ChildWindowBg] = ImVec4(0.15, 0.18, 0.22, 1.00)
      colors[clr.PopupBg] = ImVec4(0.08, 0.08, 0.08, 0.94)
      colors[clr.Border] = ImVec4(0.43, 0.43, 0.50, 0.50)
      colors[clr.BorderShadow] = ImVec4(0.00, 0.00, 0.00, 0.00)
      colors[clr.FrameBg] = ImVec4(0.20, 0.25, 0.29, 1.00)
      colors[clr.FrameBgHovered] = ImVec4(0.12, 0.20, 0.28, 1.00)
      colors[clr.FrameBgActive] = ImVec4(0.09, 0.12, 0.14, 1.00)
      colors[clr.TitleBg] = ImVec4(0.09, 0.12, 0.14, 0.65)
      colors[clr.TitleBgCollapsed] = ImVec4(0.00, 0.00, 0.00, 0.51)
      colors[clr.TitleBgActive] = ImVec4(0.08, 0.10, 0.12, 1.00)
      colors[clr.MenuBarBg] = ImVec4(0.15, 0.18, 0.22, 1.00)
      colors[clr.ScrollbarBg] = ImVec4(0.02, 0.02, 0.02, 0.39)
      colors[clr.ScrollbarGrab] = ImVec4(0.20, 0.25, 0.29, 1.00)
      colors[clr.ScrollbarGrabHovered] = ImVec4(0.18, 0.22, 0.25, 1.00)
      colors[clr.ScrollbarGrabActive] = ImVec4(0.09, 0.21, 0.31, 1.00)
      colors[clr.ComboBg] = ImVec4(0.20, 0.25, 0.29, 1.00)
      colors[clr.CheckMark] = ImVec4(0.28, 0.56, 1.00, 1.00)
      colors[clr.SliderGrab] = ImVec4(0.28, 0.56, 1.00, 1.00)
      colors[clr.SliderGrabActive] = ImVec4(0.37, 0.61, 1.00, 1.00)
      colors[clr.Button] = ImVec4(0.20, 0.25, 0.29, 1.00)
      colors[clr.ButtonHovered] = ImVec4(0.28, 0.56, 1.00, 1.00)
      colors[clr.ButtonActive] = ImVec4(0.06, 0.53, 0.98, 1.00)
      colors[clr.Header] = ImVec4(0.20, 0.25, 0.29, 0.55)
      colors[clr.HeaderHovered] = ImVec4(0.26, 0.59, 0.98, 0.80)
      colors[clr.HeaderActive] = ImVec4(0.26, 0.59, 0.98, 1.00)
      colors[clr.ResizeGrip] = ImVec4(0.26, 0.59, 0.98, 0.25)
      colors[clr.ResizeGripHovered] = ImVec4(0.26, 0.59, 0.98, 0.67)
      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.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.25, 1.00, 0.00, 0.43)
      colors[clr.ModalWindowDarkening] = ImVec4(1.00, 0.98, 0.95, 0.73)




--- Main
function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait(100) end

    autoupdate("http://f0432028.xsph.ru/clown.json", '['..string.upper(thisScript().name)..']: ', "http://f0432028.xsph.ru/clown.json")


    sampAddChatMessage("[PhoTools]: {FFFFFF}Разработчики Michael Chicago и Клоун приветствуют вас.", main_color)
    sampAddChatMessage("[PhoTools]: {FFFFFF}Феникс Тулс версии 2 успешно запущен.", main_color)



    sampRegisterChatCommand("acolor", cmd_chatcoloradm)
    sampRegisterChatCommand("offtools", cmd_offtools)
    sampRegisterChatCommand("checkrender", cmd_render)
    sampRegisterChatCommand("getinfo", cmd_getinfo)
    sampRegisterChatCommand("setinfo", cmd_setinfo)
    sampRegisterChatCommand("alive", cmd_alive)



    imgui.Process = false
    statsMenu.v = not statsMenu.v

    WorkInBackground(true)
    if not doesDirectoryExist("moonloader//config") then
        createDirectory("moonloader//config")
        inicfg.save(initable, "timersaver")
    end
    tables = inicfg.load(nil, "timersaver")
    if tables == nil then
        inicfg.save(initable, "timersaver")
        tables = inicfg.load(nil, "timersaver")
    end
    if tables.tabl.day ~= os.date("%a") then
        initable.tabl.day = os.date("%a")
        inicfg.save(initable, "timersaver")
        tables = inicfg.load(nil, "timersaver")
    end

    if not doesDirectoryExist("moonloader//config") then
        createDirectory("moonloader//config")
        inicfg.save(initable, "photools")
    end
    table1 = inicfg.load(nil, "photools")
    if table1 == nil then
        inicfg.save(shablon, "photools")
        table1 = inicfg.load(nil, "photools")
    end
    
    text_buffer.v = table1.settings.admpass
    isGm.v = table1.settings.isGm


while true do
    wait(0)

    if isKeyJustPressed(VK_0) then
        ischatopen = sampIsChatInputActive()
        if ischatopen == true then
            return
        else
            sampSendChat("/ot")
            sampSendChat("/ot")
            sampSendChat("/ot")
            wait(100)
            sampSendChat("/ot")
            wait(100)
            sampSendChat("/ot")
            wait(100)
            sampSendChat("/ot")
        end

        if isKeyDown(VK_F2) then
            wait(200)
            sampSendChat("/a Док-ва?")
        end
    end

    if not isGamePaused() then
        wait(1000)
        seconds = seconds + 1
        afk_seconds = afk_seconds + 1
        tables.tabl.second = seconds
        if tables.tabl.second == 60 and tables.tabl.time then
            tables.tabl.time = tables.tabl.time + 1
            seconds = 0
            inicfg.save(tables, "timersaver")
        end

        if afk_seconds == 60 and afk_min then
            afk_min = afk_min + 1
            afk_seconds = 0
        end

        if afk_min == 60 then
            afk_hours = afk_hours
            afk_min = 0
        end

        if tables.tabl.time == 60 then
            tables.tabl.hours = tables.tabl.hours + 1
            tables.tabl.time = 0
            inicfg.save(tables, "timersaver")
        end
    end

    if isKeyJustPressed(VK_F3) then -- ALT+F3
        nameTagOn()
        repeat
        wait(0)
        if isKeyDown(119) then
            nameTagOff()
            wait(1000)
            nameTagOn()
        end
        until isKeyJustPressed(114)
        while isKeyDown(114) do
        wait(10)
        end
        nameTagOff()
    end
    
    if table1.settings.isGm == 1 then
        setCharProofs(playerPed, true, true, true, true, true)
        writeMemory(0x96916E, 1, 1, false)
    end

    if table1.settings.isGm == 0 then
        setCharProofs(playerPed, false, false, false, false, false)
          writeMemory(0x96916E, 1, 0, false)
    end


    imgui.Process = imguiWindow.v or authorMenu.v or statsMenu.v or dialogMenu.v and true

end
end



--- Functions


function cmd_chatcoloradm(arg)
    if #arg == 8 then
        sampAddChatMessage(tag .. "Цвет успешно поменян на " .. arg, main_color)
        admin_color = arg
    else
            sampAddChatMessage(tag .. "Неверные параметры. Значение сейчас: " .. admin_color, main_color)
    end
end

function nameTagOn()
    sampTextdrawCreate(12414, "Wallhack On", 250, 250)
    local pStSet = sampGetServerSettingsPtr()
    NTdist = mem.getfloat(pStSet + 39) -- дальность
    NTwalls = mem.getint8(pStSet + 47) -- видимость через стены
    NTshow = mem.getint8(pStSet + 56) -- видимость тегов
    mem.setfloat(pStSet + 39, 1488.0)
    mem.setint8(pStSet + 47, 0)
    mem.setint8(pStSet + 56, 1)
    sampTextdrawDelete(12414)
end

function nameTagOff()
    sampTextdrawCreate(12454, "Wallhack Off", 250, 250)
    local pStSet = sampGetServerSettingsPtr()
    mem.setfloat(pStSet + 39, NTdist)
    mem.setint8(pStSet + 47, NTwalls)
    mem.setint8(pStSet + 56, NTshow)
    sampTextdrawDelete(12454)
end


--- Events
function onExitScript()
    if NTdist then
        nameTagOff()
    end
end


function ev.onServerMessage(color, text)
    if string.find(text, "%[A%] (.+)%[(%d+)%]: (.+)") then
            sampAddChatMessage(text, table1.settings.color_admchat)
            return false
    end

    if string.find(text, "%[Жалоба] от (.+)%[(%d+)]:{FFFFFF} (.+)%. Уже (%d+) жалоб!!!") then
        namerep, idrep, textreport, jalobi = text:match("%[Жалоба] от (.+)%[(%d+)]:{FFFFFF} (.+)%. Уже (%d+) жалоб!!!")
    end

    if string.find(text, "Администратор (.+)%[(%d+)] ответил игроку (.+)%[(%d+)]: (.+)%") then
        jalobi = jalobi - 1
    end


    if string.find(text, "%[A%] (.+)%[(%d+)%]: /jail") then
                sampSendChat("/a Док-ва есть? [by PhoTools]")
                return false
        end

    if string.find(text, "%[A%] (.+)%[(%d+)%]: /kick") then
                sampSendChat("/a Док-ва есть? [by PhoTools]")
                return false
        end

    if string.find(text, "%[A%] (.+)%[(%d+)%]: /mute") then
                sampSendChat("/a Док-ва есть? [by PhoTools]")
                return false
    end

    if string.find(text, "%[A%] (.+)%[(%d+)%]: /spcar") then
                sampSendChat("/a Док-ва есть? [by PhoTools]")
                return false
  end
end

function cmd_getinfo(arg)
    mainIni = inicfg.load(nil, directIni)
    sampAddChatMessage(mainIni.config.surname, -1)
  end

function cmd_setinfo(arg)
    file:write("kek")
 
  end

function cmd_render()
    imguiWindow.v = not imguiWindow.v
end

function cmd_alive()
    sampAddChatMessage("Живой.",main_color)
end   


function join_argb(a, r, g, b)
    local argb = b  -- b
    argb = bit.bor(argb, bit.lshift(g, 8))  -- g
    argb = bit.bor(argb, bit.lshift(r, 16)) -- r
    argb = bit.bor(argb, bit.lshift(a, 24)) -- a
    return argb
end

function imgui.OnDrawFrame()
    if imguiWindow.v then
        imgui.SetNextWindowSize(imgui.ImVec2(700, 320), imgui.Cond.FirstUseEver)
        imgui.SetNextWindowPos(imgui.ImVec2(700, 200), imgui.Cond.FirstUseEver)
        imgui.Begin(fa.ICON_PENCIL .. ' Phoenix Tools', imguiWindow, 6 + imgui.WindowFlags.NoCollapse + imgui.WindowFlags.NoScrollbar)
        if imgui.Button(u8"Информация", imgui.ImVec2(100, 75)) then
            
        end


        if imgui.Button(u8"Основные настройки",imgui.ImVec2(100, 75)) then
            settings = not settings
        end


        if imgui.Button(u8"Цвета", imgui.ImVec2(100, 75)) then

        end
        
    
        if settings == true then

            imgui.Text(u8"Админ чат:")
            imgui.SameLine()
            imgui.ColorEdit3("", color)
            imgui.Text(u8"Пароль адм:")
            imgui.SameLine()
            imgui.PushItemWidth(50)
            imgui.InputText("##123", text_buffer)
            imgui.PopItemWidth()
            imgui.Text(u8"")
            imgui.InputText("##228", admlvl)
            if imgui.Button(u8"Сохранить") then
                local clr = join_argb(0, color.v[1] * 255, color.v[2] * 255, color.v[3] * 255)
                table1.settings.admpass = text_buffer.v
                table1.settings.color_admchat = clr
                if inicfg.save(table1,"photools") then
                    sampAddChatMessage(tag .. "Успешно сохранено.", clr)
                end
            end
        end
        imgui.End()
    end

    
    if statsMenu.v then
               imgui.SetNextWindowSize(imgui.ImVec2(200, 125), imgui.Cond.FirstUseEver)
                imgui.Begin(u8'Статистика', statsMenu,  2)
               if tables.tabl.hours <= 10 then
                   if tables.tabl.time < 9 then
                        if seconds <= 10 then
                        imgui.Text(u8"Онлайн за сегодня: " .. "0" .. tables.tabl.hours..":".. "0"..tables.tabl.time..":" .. "0" .. seconds)
                        end
                        if seconds >= 10 then
                            imgui.Text(u8"Онлайн за сегодня: " .. "0" .. tables.tabl.hours..":".. "0"..tables.tabl.time..":" .. seconds)
                        end
                    end
                    if tables.tabl.time > 9 then
                        if seconds <= 10 then
                            imgui.Text(u8"Онлайн за сегодня: " .. "0" .. tables.tabl.hours..":".. tables.tabl.time..":" .. "0" .. seconds)
                            end
                            if seconds >= 10 then
                                imgui.Text(u8"Онлайн за сегодня: " .. "0" .. tables.tabl.hours..":".. tables.tabl.time..":" .. seconds)
                            end
                    end
                end
                if tables.tabl.hours >= 10 then
                    if tables.tabl.time <= 10 then
                        if seconds <= 10 then
                            imgui.Text(u8"Онлайн за сегодня: " ..  tables.tabl.hours..":".. "0"..tables.tabl.time..":" .. "0" .. seconds)
                            end
                            if seconds >= 10 then
                                imgui.Text(u8"Онлайн за сегодня: " .. tables.tabl.hours..":".. "0"..tables.tabl.time..":" .. seconds)
                            end
                    end
                    if tables.tabl.time > 9 then
                        if seconds <= 9 then
                            imgui.Text(u8"Онлайн за сегодня: " ..  tables.tabl.hours..":".. tables.tabl.time..":" .. "0" .. seconds)
                            end
                            if seconds >= 9 then
                                imgui.Text(u8"Онлайн за сегодня: " .. tables.tabl.hours..":".. tables.tabl.time..":" .. seconds)
                            end
                    end
                end
                imgui.Text(u8"Текущая сессия: " .. afk_hours .. ":" .. afk_min .. ":" .. afk_seconds)
                imgui.Text(u8"Сейчас репорта:" .. jalobi)
                imgui.End()
            end
        
            if dialogMenu.v then
                local name, idpl, reporttext = dialogText:match('Жалоба/Вопрос от: (.+)%[(%d+)]')
                local reporttext1 = string.gsub(dialogText,"Жалоба/Вопрос от: (.+)%[(%d+)]","")
                local reporttext2 = string.gsub(reporttext1,"{FFFFFF}", "")
                local reporttext3 = string.gsub(reporttext2, "{BFE54C}", "")
            
        
                
                imgui.SetNextWindowSize(imgui.ImVec2(700, 700), imgui.Cond.FirstUseEver)
                imgui.SetNextWindowPos(imgui.ImVec2(340,214), imgui.Cond.FirstUseEver)
                imgui.Begin(u8("Репорт!" .. name .. "[" .. idpl .. "]"))
                imgui.Text(u8("Репорт от:") .. name .. "[" .. idpl .. "]")
                imgui.Text(u8(reporttext3))
                idnapysh = reporttext3:match('(%d+)')
                imgui.InputText("", report_answer)
                imgui.Text(report_answer.v)
                if imgui.Button(u8("Ответить")) then
                    sampSendDialogResponse(dialogID,1,0,u8:decode(report_answer.v))
                    sampAddChatMessage(idnapysh, main_color)
                    dialogMenu.v = not dialogMenu.v
                    report_answer.v = ""
                end
                imgui.SameLine()
                if imgui.Button(u8("Помочь игроку")) then
                    sampSendDialogResponse(dialogID,1,0,"Уважаемый игрок, сейчас попробую вам помочь!")
                    sampAddChatMessage(idnapysh, main_color)
                    sampSendChat("/re " .. idpl)
                    dialogMenu.v = not dialogMenu.v
                    report_answer.v = ""
                end
                if imgui.Button(u8("Следить за нарушителем")) then
                    if idnapysh == nil then
                        sampAddChatMessage(tag .. " В репорте не обнаружен ИД.", main_color)
                    else
                        sampSendDialogResponse(dialogID,1,0,"Уважаемый игрок, слежу за нарушителем.")
                        sampSendChat("/re " .. idnapysh)
                        report_answer.v = ""
                        dialogMenu.v = not dialogMenu.v
                        idnapysh = ""
                    end
                end
                imgui.End()
            end
        end
        



function ev.onShowDialog(id, style, title, b1, b2, text)
    if text:find("Жалоба") then
        dialogMenu.v = not dialogMenu.v
        sampAddChatMessage("Только что был репорт", main_color)
        dialogID = id
        dialogText = text
        return false
    end
    if title:find("Быстрый ответ") then
        sampSendDialogResponse(id,0,0,"")
        sampAddChatMessage(tag .. " Был быстрый ответ.", main_color)
        return false
    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..'Обновление завершено!'), color)
                        script_version_number = updateversion
                        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
                print('v'..thisScript().version..': Обновление не требуется.')
              end
            end
          else
            print('v'..thisScript().version..': Не могу проверить обновление. Смиритесь или проверьте самостоятельно на '..url)
            update = false
          end
        end
      end
    )
    while update ~= false do wait(100) end
  end

function onScriptTerminate(LuaScript, quitGame)
    if LuaScript == thisScript().name then
        tables.tabl.second = seconds
        inicfg.save(tables, "timersaver")
    end
end
 

Albertio

Attention! Thanks for your attention.
877
702
Lua:
script_name("PhoTools")
script_authors("Chicago")
script_version("3")
script_dependencies("SAMPFUNCS")


require"lib.moonloader"
require"lib.sampfuncs"



local keys = require "vkeys"
local ev = require 'lib.samp.events';
local tag = "[PhoTools]:"
local imgui = require 'imgui'
local text_buffer = imgui.ImBuffer(256)
local admlvl = imgui.ImBuffer(256)
local report_answer = imgui.ImBuffer(256)
local encoding = require 'encoding' -- загружаем
local imguiWindow, authorMenu, statsMenu, dialogMenu, testMenu = imgui.ImBool(false), imgui.ImBool(false), imgui.ImBool(false), imgui.ImBool(false),imgui.ImBool(false)
encoding.default = 'CP1251' -- указываем кодировку по умолчанию, она должна совпадать с кодировкой файла. CP1251 - это Windows-1251
u8 = encoding.UTF8 -- и создаём короткий псевдоним для кодировщика UTF-8
local inicfg = require 'inicfg'
local dialogID = ""
local dialogText = ""
local shablon = {
    settings = {
        admpass = "",
        lvladm = "",
        gm = 0,
        color_admchat = "",
    }
}
local fa = require "faicons"
local fa_glyph_ranges = imgui.ImGlyphRanges({fa.min_range, fa.max_range})

function imgui.BeforeDrawFrame()
    if fa_font == nil then
        local font_config = imgui.ImFontConfig() -- to use 'imgui.ImFontConfig.new()' on error
        font_config.MergeMode = true
        fa_font = imgui.GetIO().Fonts:AddFontFromFileTTF('moonloader/resource/fonts/fontawesome-webfont.ttf', 14.0, font_config, fa_glyph_ranges)
    end
end


local imguiSettings, imguiColor, imguiAuthor = false, false, false

local isGmNum = 0
local mem = require "memory"

local isGm = imgui.ImBool(true)


local table1

local directIni = "moonloader\\settings.ini"

local mainIni = inicfg.load(nil, directIni)
local initable = {
    tabl = {
        day = os.date("%a"),
        time = 00,
        hours = 00,
        second = 00,
        afk_time = 00,
        afk_hours = 00,
        afk_second = 00
        }

    }
local seconds = 0
local afk_seconds = 0
local afk_min = 0
local afk_hours = 0
local tables
local color = imgui.ImFloat3(1.0, 1.0, 1.0)
function WorkInBackground(work)
        local memory = require 'memory'
        if work then -- on
            memory.setuint8(7634870, 1)
            memory.setuint8(7635034, 1)
            memory.fill(7623723, 144, 8)
            memory.fill(5499528, 144, 6)
        else -- off
            memory.setuint8(7634870, 0)
            memory.setuint8(7635034, 0)
            memory.hex2bin('5051FF1500838500', 7623723, 8)
            memory.hex2bin('0F847B010000', 5499528, 6)
        end
    end





-- 177 185

local tag = '[PhoenixTools]:'
local main_color = 0x5290CE
local white_color = "{FFFFFF}"
local admin_color = 0
local checked_radio = imgui.ImInt(1)
local combo_select = imgui.ImInt(0)
local checked_box = imgui.ImBool()
local combo_select = imgui.ImBool()
local sw, sh = getScreenResolution()

local jalobi = 0

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 = 15.0
    style.FramePadding = ImVec2(5, 5)
    style.ItemSpacing = ImVec2(12, 8)
    style.ItemInnerSpacing = ImVec2(8, 6)
    style.IndentSpacing = 25.0
    style.ScrollbarSize = 15.0
    style.ScrollbarRounding = 15.0
    style.GrabMinSize = 15.0
    style.GrabRounding = 7.0
    style.ChildWindowRounding = 8.0
    style.FrameRounding = 6.0


      colors[clr.Text] = ImVec4(0.95, 0.96, 0.98, 1.00)
      colors[clr.TextDisabled] = ImVec4(0.36, 0.42, 0.47, 1.00)
      colors[clr.WindowBg] = ImVec4(0.11, 0.15, 0.17, 1.00)
      colors[clr.ChildWindowBg] = ImVec4(0.15, 0.18, 0.22, 1.00)
      colors[clr.PopupBg] = ImVec4(0.08, 0.08, 0.08, 0.94)
      colors[clr.Border] = ImVec4(0.43, 0.43, 0.50, 0.50)
      colors[clr.BorderShadow] = ImVec4(0.00, 0.00, 0.00, 0.00)
      colors[clr.FrameBg] = ImVec4(0.20, 0.25, 0.29, 1.00)
      colors[clr.FrameBgHovered] = ImVec4(0.12, 0.20, 0.28, 1.00)
      colors[clr.FrameBgActive] = ImVec4(0.09, 0.12, 0.14, 1.00)
      colors[clr.TitleBg] = ImVec4(0.09, 0.12, 0.14, 0.65)
      colors[clr.TitleBgCollapsed] = ImVec4(0.00, 0.00, 0.00, 0.51)
      colors[clr.TitleBgActive] = ImVec4(0.08, 0.10, 0.12, 1.00)
      colors[clr.MenuBarBg] = ImVec4(0.15, 0.18, 0.22, 1.00)
      colors[clr.ScrollbarBg] = ImVec4(0.02, 0.02, 0.02, 0.39)
      colors[clr.ScrollbarGrab] = ImVec4(0.20, 0.25, 0.29, 1.00)
      colors[clr.ScrollbarGrabHovered] = ImVec4(0.18, 0.22, 0.25, 1.00)
      colors[clr.ScrollbarGrabActive] = ImVec4(0.09, 0.21, 0.31, 1.00)
      colors[clr.ComboBg] = ImVec4(0.20, 0.25, 0.29, 1.00)
      colors[clr.CheckMark] = ImVec4(0.28, 0.56, 1.00, 1.00)
      colors[clr.SliderGrab] = ImVec4(0.28, 0.56, 1.00, 1.00)
      colors[clr.SliderGrabActive] = ImVec4(0.37, 0.61, 1.00, 1.00)
      colors[clr.Button] = ImVec4(0.20, 0.25, 0.29, 1.00)
      colors[clr.ButtonHovered] = ImVec4(0.28, 0.56, 1.00, 1.00)
      colors[clr.ButtonActive] = ImVec4(0.06, 0.53, 0.98, 1.00)
      colors[clr.Header] = ImVec4(0.20, 0.25, 0.29, 0.55)
      colors[clr.HeaderHovered] = ImVec4(0.26, 0.59, 0.98, 0.80)
      colors[clr.HeaderActive] = ImVec4(0.26, 0.59, 0.98, 1.00)
      colors[clr.ResizeGrip] = ImVec4(0.26, 0.59, 0.98, 0.25)
      colors[clr.ResizeGripHovered] = ImVec4(0.26, 0.59, 0.98, 0.67)
      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.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.25, 1.00, 0.00, 0.43)
      colors[clr.ModalWindowDarkening] = ImVec4(1.00, 0.98, 0.95, 0.73)




--- Main
function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait(100) end

    autoupdate("http://f0432028.xsph.ru/clown.json", '['..string.upper(thisScript().name)..']: ', "http://f0432028.xsph.ru/clown.json")


    sampAddChatMessage("[PhoTools]: {FFFFFF}Разработчики Michael Chicago и Клоун приветствуют вас.", main_color)
    sampAddChatMessage("[PhoTools]: {FFFFFF}Феникс Тулс версии 2 успешно запущен.", main_color)



    sampRegisterChatCommand("acolor", cmd_chatcoloradm)
    sampRegisterChatCommand("offtools", cmd_offtools)
    sampRegisterChatCommand("checkrender", cmd_render)
    sampRegisterChatCommand("getinfo", cmd_getinfo)
    sampRegisterChatCommand("setinfo", cmd_setinfo)
    sampRegisterChatCommand("alive", cmd_alive)



    imgui.Process = false
    statsMenu.v = not statsMenu.v

    WorkInBackground(true)
    if not doesDirectoryExist("moonloader//config") then
        createDirectory("moonloader//config")
        inicfg.save(initable, "timersaver")
    end
    tables = inicfg.load(nil, "timersaver")
    if tables == nil then
        inicfg.save(initable, "timersaver")
        tables = inicfg.load(nil, "timersaver")
    end
    if tables.tabl.day ~= os.date("%a") then
        initable.tabl.day = os.date("%a")
        inicfg.save(initable, "timersaver")
        tables = inicfg.load(nil, "timersaver")
    end

    if not doesDirectoryExist("moonloader//config") then
        createDirectory("moonloader//config")
        inicfg.save(initable, "photools")
    end
    table1 = inicfg.load(nil, "photools")
    if table1 == nil then
        inicfg.save(shablon, "photools")
        table1 = inicfg.load(nil, "photools")
    end

    text_buffer.v = table1.settings.admpass
    isGm.v = table1.settings.isGm


while true do
    wait(0)

    if isKeyJustPressed(VK_0) then
        ischatopen = sampIsChatInputActive()
        if ischatopen == true then
            return
        else
            sampSendChat("/ot")
            sampSendChat("/ot")
            sampSendChat("/ot")
            wait(100)
            sampSendChat("/ot")
            wait(100)
            sampSendChat("/ot")
            wait(100)
            sampSendChat("/ot")
        end

        if isKeyDown(VK_F2) then
            wait(200)
            sampSendChat("/a Док-ва?")
        end
    end

    if not isGamePaused() then
        wait(1000)
        seconds = seconds + 1
        afk_seconds = afk_seconds + 1
        tables.tabl.second = seconds
        if tables.tabl.second == 60 and tables.tabl.time then
            tables.tabl.time = tables.tabl.time + 1
            seconds = 0
            inicfg.save(tables, "timersaver")
        end

        if afk_seconds == 60 and afk_min then
            afk_min = afk_min + 1
            afk_seconds = 0
        end

        if afk_min == 60 then
            afk_hours = afk_hours
            afk_min = 0
        end

        if tables.tabl.time == 60 then
            tables.tabl.hours = tables.tabl.hours + 1
            tables.tabl.time = 0
            inicfg.save(tables, "timersaver")
        end
    end

    if isKeyJustPressed(VK_F3) then -- ALT+F3
        nameTagOn()
        repeat
        wait(0)
        if isKeyDown(119) then
            nameTagOff()
            wait(1000)
            nameTagOn()
        end
        until isKeyJustPressed(114)
        while isKeyDown(114) do
        wait(10)
        end
        nameTagOff()
    end

    if table1.settings.isGm == 1 then
        setCharProofs(playerPed, true, true, true, true, true)
        writeMemory(0x96916E, 1, 1, false)
    end

    if table1.settings.isGm == 0 then
        setCharProofs(playerPed, false, false, false, false, false)
          writeMemory(0x96916E, 1, 0, false)
    end


    imgui.Process = imguiWindow.v or authorMenu.v or statsMenu.v or dialogMenu.v and true
        if not imguiWindow.v and not authorMenu.v and not statsMenu.v and not dialogMenu.v then
            imgui.ShowCursor = false
        end

end
end



--- Functions


function cmd_chatcoloradm(arg)
    if #arg == 8 then
        sampAddChatMessage(tag .. "Цвет успешно поменян на " .. arg, main_color)
        admin_color = arg
    else
            sampAddChatMessage(tag .. "Неверные параметры. Значение сейчас: " .. admin_color, main_color)
    end
end

function nameTagOn()
    sampTextdrawCreate(12414, "Wallhack On", 250, 250)
    local pStSet = sampGetServerSettingsPtr()
    NTdist = mem.getfloat(pStSet + 39) -- дальность
    NTwalls = mem.getint8(pStSet + 47) -- видимость через стены
    NTshow = mem.getint8(pStSet + 56) -- видимость тегов
    mem.setfloat(pStSet + 39, 1488.0)
    mem.setint8(pStSet + 47, 0)
    mem.setint8(pStSet + 56, 1)
    sampTextdrawDelete(12414)
end

function nameTagOff()
    sampTextdrawCreate(12454, "Wallhack Off", 250, 250)
    local pStSet = sampGetServerSettingsPtr()
    mem.setfloat(pStSet + 39, NTdist)
    mem.setint8(pStSet + 47, NTwalls)
    mem.setint8(pStSet + 56, NTshow)
    sampTextdrawDelete(12454)
end


--- Events
function onExitScript()
    if NTdist then
        nameTagOff()
    end
end


function ev.onServerMessage(color, text)
    if string.find(text, "%[A%] (.+)%[(%d+)%]: (.+)") then
            sampAddChatMessage(text, table1.settings.color_admchat)
            return false
    end

    if string.find(text, "%[Жалоба] от (.+)%[(%d+)]:{FFFFFF} (.+)%. Уже (%d+) жалоб!!!") then
        namerep, idrep, textreport, jalobi = text:match("%[Жалоба] от (.+)%[(%d+)]:{FFFFFF} (.+)%. Уже (%d+) жалоб!!!")
    end

    if string.find(text, "Администратор (.+)%[(%d+)] ответил игроку (.+)%[(%d+)]: (.+)%") then
        jalobi = jalobi - 1
    end


    if string.find(text, "%[A%] (.+)%[(%d+)%]: /jail") then
                sampSendChat("/a Док-ва есть? [by PhoTools]")
                return false
        end

    if string.find(text, "%[A%] (.+)%[(%d+)%]: /kick") then
                sampSendChat("/a Док-ва есть? [by PhoTools]")
                return false
        end

    if string.find(text, "%[A%] (.+)%[(%d+)%]: /mute") then
                sampSendChat("/a Док-ва есть? [by PhoTools]")
                return false
    end

    if string.find(text, "%[A%] (.+)%[(%d+)%]: /spcar") then
                sampSendChat("/a Док-ва есть? [by PhoTools]")
                return false
  end
end

function cmd_getinfo(arg)
    mainIni = inicfg.load(nil, directIni)
    sampAddChatMessage(mainIni.config.surname, -1)
  end

function cmd_setinfo(arg)
    file:write("kek")

  end

function cmd_render()
    imguiWindow.v = not imguiWindow.v
end

function cmd_alive()
    sampAddChatMessage("Живой.",main_color)
end


function join_argb(a, r, g, b)
    local argb = b  -- b
    argb = bit.bor(argb, bit.lshift(g, 8))  -- g
    argb = bit.bor(argb, bit.lshift(r, 16)) -- r
    argb = bit.bor(argb, bit.lshift(a, 24)) -- a
    return argb
end

function imgui.OnDrawFrame()
    if imguiWindow.v then
            imgui.ShowCursor = true
        imgui.SetNextWindowSize(imgui.ImVec2(700, 320), imgui.Cond.FirstUseEver)
        imgui.SetNextWindowPos(imgui.ImVec2(700, 200), imgui.Cond.FirstUseEver)
        imgui.Begin(fa.ICON_PENCIL .. ' Phoenix Tools', imguiWindow, 6 + imgui.WindowFlags.NoCollapse + imgui.WindowFlags.NoScrollbar)
        if imgui.Button(u8"Информация", imgui.ImVec2(100, 75)) then

        end


        if imgui.Button(u8"Основные настройки",imgui.ImVec2(100, 75)) then
            settings = not settings
        end


        if imgui.Button(u8"Цвета", imgui.ImVec2(100, 75)) then

        end


        if settings == true then

            imgui.Text(u8"Админ чат:")
            imgui.SameLine()
            imgui.ColorEdit3("", color)
            imgui.Text(u8"Пароль адм:")
            imgui.SameLine()
            imgui.PushItemWidth(50)
            imgui.InputText("##123", text_buffer)
            imgui.PopItemWidth()
            imgui.Text(u8"")
            imgui.InputText("##228", admlvl)
            if imgui.Button(u8"Сохранить") then
                local clr = join_argb(0, color.v[1] * 255, color.v[2] * 255, color.v[3] * 255)
                table1.settings.admpass = text_buffer.v
                table1.settings.color_admchat = clr
                if inicfg.save(table1,"photools") then
                    sampAddChatMessage(tag .. "Успешно сохранено.", clr)
                end
            end
        end
        imgui.End()
    end


    if statsMenu.v then
            imgui.ShowCursor = false
               imgui.SetNextWindowSize(imgui.ImVec2(200, 125), imgui.Cond.FirstUseEver)
                imgui.Begin(u8'Статистика', statsMenu,  2)
               if tables.tabl.hours <= 10 then
                   if tables.tabl.time < 9 then
                        if seconds <= 10 then
                        imgui.Text(u8"Онлайн за сегодня: " .. "0" .. tables.tabl.hours..":".. "0"..tables.tabl.time..":" .. "0" .. seconds)
                        end
                        if seconds >= 10 then
                            imgui.Text(u8"Онлайн за сегодня: " .. "0" .. tables.tabl.hours..":".. "0"..tables.tabl.time..":" .. seconds)
                        end
                    end
                    if tables.tabl.time > 9 then
                        if seconds <= 10 then
                            imgui.Text(u8"Онлайн за сегодня: " .. "0" .. tables.tabl.hours..":".. tables.tabl.time..":" .. "0" .. seconds)
                            end
                            if seconds >= 10 then
                                imgui.Text(u8"Онлайн за сегодня: " .. "0" .. tables.tabl.hours..":".. tables.tabl.time..":" .. seconds)
                            end
                    end
                end
                if tables.tabl.hours >= 10 then
                    if tables.tabl.time <= 10 then
                        if seconds <= 10 then
                            imgui.Text(u8"Онлайн за сегодня: " ..  tables.tabl.hours..":".. "0"..tables.tabl.time..":" .. "0" .. seconds)
                            end
                            if seconds >= 10 then
                                imgui.Text(u8"Онлайн за сегодня: " .. tables.tabl.hours..":".. "0"..tables.tabl.time..":" .. seconds)
                            end
                    end
                    if tables.tabl.time > 9 then
                        if seconds <= 9 then
                            imgui.Text(u8"Онлайн за сегодня: " ..  tables.tabl.hours..":".. tables.tabl.time..":" .. "0" .. seconds)
                            end
                            if seconds >= 9 then
                                imgui.Text(u8"Онлайн за сегодня: " .. tables.tabl.hours..":".. tables.tabl.time..":" .. seconds)
                            end
                    end
                end
                imgui.Text(u8"Текущая сессия: " .. afk_hours .. ":" .. afk_min .. ":" .. afk_seconds)
                imgui.Text(u8"Сейчас репорта:" .. jalobi)
                imgui.End()
            end

            if dialogMenu.v then
                            imgui.ShowCursor = true
                local name, idpl, reporttext = dialogText:match('Жалоба/Вопрос от: (.+)%[(%d+)]')
                local reporttext1 = string.gsub(dialogText,"Жалоба/Вопрос от: (.+)%[(%d+)]","")
                local reporttext2 = string.gsub(reporttext1,"{FFFFFF}", "")
                local reporttext3 = string.gsub(reporttext2, "{BFE54C}", "")



                imgui.SetNextWindowSize(imgui.ImVec2(700, 700), imgui.Cond.FirstUseEver)
                imgui.SetNextWindowPos(imgui.ImVec2(340,214), imgui.Cond.FirstUseEver)
                imgui.Begin(u8("Репорт!" .. name .. "[" .. idpl .. "]"))
                imgui.Text(u8("Репорт от:") .. name .. "[" .. idpl .. "]")
                imgui.Text(u8(reporttext3))
                idnapysh = reporttext3:match('(%d+)')
                imgui.InputText("", report_answer)
                imgui.Text(report_answer.v)
                if imgui.Button(u8("Ответить")) then
                    sampSendDialogResponse(dialogID,1,0,u8:decode(report_answer.v))
                    sampAddChatMessage(idnapysh, main_color)
                    dialogMenu.v = not dialogMenu.v
                    report_answer.v = ""
                end
                imgui.SameLine()
                if imgui.Button(u8("Помочь игроку")) then
                    sampSendDialogResponse(dialogID,1,0,"Уважаемый игрок, сейчас попробую вам помочь!")
                    sampAddChatMessage(idnapysh, main_color)
                    sampSendChat("/re " .. idpl)
                    dialogMenu.v = not dialogMenu.v
                    report_answer.v = ""
                end
                if imgui.Button(u8("Следить за нарушителем")) then
                    if idnapysh == nil then
                        sampAddChatMessage(tag .. " В репорте не обнаружен ИД.", main_color)
                    else
                        sampSendDialogResponse(dialogID,1,0,"Уважаемый игрок, слежу за нарушителем.")
                        sampSendChat("/re " .. idnapysh)
                        report_answer.v = ""
                        dialogMenu.v = not dialogMenu.v
                        idnapysh = ""
                    end
                end
                imgui.End()
            end
        end




function ev.onShowDialog(id, style, title, b1, b2, text)
    if text:find("Жалоба") then
        dialogMenu.v = not dialogMenu.v
        sampAddChatMessage("Только что был репорт", main_color)
        dialogID = id
        dialogText = text
        return false
    end
    if title:find("Быстрый ответ") then
        sampSendDialogResponse(id,0,0,"")
        sampAddChatMessage(tag .. " Был быстрый ответ.", main_color)
        return false
    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..'Обновление завершено!'), color)
                        script_version_number = updateversion
                        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
                print('v'..thisScript().version..': Обновление не требуется.')
              end
            end
          else
            print('v'..thisScript().version..': Не могу проверить обновление. Смиритесь или проверьте самостоятельно на '..url)
            update = false
          end
        end
      end
    )
    while update ~= false do wait(100) end
  end

function onScriptTerminate(LuaScript, quitGame)
    if LuaScript == thisScript().name then
        tables.tabl.second = seconds
        inicfg.save(tables, "timersaver")
    end
end
 

Albertio

Attention! Thanks for your attention.
877
702
Как я могу проверить твой скрипт если ты мне изначально кидаешь скрипт с ошибкой?
1588323484653.png