чё-то непонятное

darkmeleee

Участник
Автор темы
98
12
Версия MoonLoader
.027.0-preview
привет всем, проблема такая. луа пишет ошибку мол энд тут лишний на 522 строке
Код:
468   if statsMenu.v then
469        imgui.SetNextWindowSize(imgui.ImVec2(200, 125), imgui.Cond.FirstUseEver)
470        imgui.Begin(u8'Статистика', statsMenu,  2)
471        if tables.tabl.hours <= 10 then
472            if tables.tabl.time < 9 then
473                if seconds <= 10 then
474                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("В диалоге не обнаружен ID", main_color)
            end
            else
                sampSendDialogResponse(dialogID,1,0,"Уважаемый игрок, слежу за нарушителем!")
            end
        end
        imgui.End()
    end
522 end
убираю энд - крашит. чо делать?

проблема решена - просто вырезал.
 
Последнее редактирование:

damag

Женюсь на официантке в моем любимом баре
Проверенный
1,152
1,192
привет всем, проблема такая. луа пишет ошибку мол энд тут лишний на 522 строке
Код:
468   if statsMenu.v then
469        imgui.SetNextWindowSize(imgui.ImVec2(200, 125), imgui.Cond.FirstUseEver)
470        imgui.Begin(u8'Статистика', statsMenu,  2)
471        if tables.tabl.hours <= 10 then
472            if tables.tabl.time < 9 then
473                if seconds <= 10 then
474                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("В диалоге не обнаружен ID", main_color)
            end
            else
                sampSendDialogResponse(dialogID,1,0,"Уважаемый игрок, слежу за нарушителем!")
            end
        end
        imgui.End()
    end
522 end
убираю энд - крашит. чо делать?
Протести
Lua:
:
468   if statsMenu.v then
469        imgui.SetNextWindowSize(imgui.ImVec2(200, 125), imgui.Cond.FirstUseEver)
470        imgui.Begin(u8'Статистика', statsMenu,  2)
471        if tables.tabl.hours <= 10 then
472            if tables.tabl.time < 9 then
473                if seconds <= 10 then
474                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("В диалоге не обнаружен ID", main_color)
            end
            else
                sampSendDialogResponse(dialogID,1,0,"Уважаемый игрок, слежу за нарушителем!")
            end
            imgui.End()
        end
    end
 

Jesus McWood

Участник
76
33
привет всем, проблема такая. луа пишет ошибку мол энд тут лишний на 522 строке
Код:
468   if statsMenu.v then
469        imgui.SetNextWindowSize(imgui.ImVec2(200, 125), imgui.Cond.FirstUseEver)
470        imgui.Begin(u8'Статистика', statsMenu,  2)
471        if tables.tabl.hours <= 10 then
472            if tables.tabl.time < 9 then
473                if seconds <= 10 then
474                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("В диалоге не обнаружен ID", main_color)
            end
            else
                sampSendDialogResponse(dialogID,1,0,"Уважаемый игрок, слежу за нарушителем!")
            end
        end
        imgui.End()
    end
522 end
убираю энд - крашит. чо делать?
Кинь фулл код
 

darkmeleee

Участник
Автор темы
98
12
тебе 2к с лишним строк кидать?
функция имгуи:
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('Phoenix Tools', imguiWindow, 6 + imgui.WindowFlags.NoCollapse + imgui.WindowFlags.NoScrollbar)
        if imgui.Button(u8"Информация") then
            
        end


        if imgui.Button(u8"Основные настройки") then

        end


        if imgui.Button(u8"Цвета") then

        end
        
    

        if imgui.CollapsingHeader(u8"Основные настройки.") 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
                imgui.End()
            end
        end
 
Последнее редактирование:

Jesus McWood

Участник
76
33
тебе 2к с лишним строк кидать?
функция имгуи:
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('Phoenix Tools', imguiWindow, 6 + imgui.WindowFlags.NoCollapse + imgui.WindowFlags.NoScrollbar)
        if imgui.Button(u8"Информация") then
           
        end


        if imgui.Button(u8"Основные настройки") then

        end


        if imgui.Button(u8"Цвета") then

        end
       
   

        if imgui.CollapsingHeader(u8"Основные настройки.") 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
                imgui.End()
            end
        end
Мда. Не надо