не закрывает диалог окно

sadasdasdasdasdasd

Известный
Автор темы
88
19
Версия MoonLoader
Другое
не работает закрытие диалог окно, пробовал через sampclosecurrentdialogwithbutton и sampsenddialogresponse, но не закрывало, помогите пожалуйста

Lua:
function processing_telegram_messages(result) -- функция проверОчки того что отправил чел
    if active.v then
        if result then
            -- тута мы проверяем все ли верно
            local proc_table = decodeJson(result)
            if proc_table.ok then
                if #proc_table.result > 0 then
                    local res_table = proc_table.result[1]
                    if res_table then
                        if res_table.update_id ~= updateid then
                            updateid = res_table.update_id
                            local message_from_user = res_table.message.text
                            if message_from_user then
                                -- и тут если чел отправил текст мы сверяем
                                local text = u8:decode(message_from_user) .. ' ' --добавляем в конец пробел дабы не произошли тех. шоколадки с командами(типо чтоб !q не считалось как !qq)
                                if text:match('^!qq') then
                                    sendTelegramNotification('Ку')
                                elseif text:match('^!q') then
                                    sendTelegramNotification('Привет!')
                                elseif text:match('^!radius') then
                                    sendTelegramNotification('Игроки в радиусе:')
                                    sendigrokradiusTg()
                                elseif text:match('^!status') then
                                    sendStatusTg()
                                elseif text:match('^!stats') then
                                    sampSendChat('/stats')
                                    text = sampGetDialogText()
                                    sendTelegramNotification(text)
                                    sampCloseCurrentDialogWithButton(0)
                                    
                                else
                                    sendTelegramNotification('Неизвестная команда!')
                                end
                            end
                        end
                    end
                end
            end
        end
    end
end
 
  • Эм
Реакции: qdIbp

MakiYasher

Новичок
14
2
Lua:
function processing_telegram_messages(result) -- функция проверОчки того что отправил чел
  lua_thread.create(function()
    if active.v then
        if result then
            -- тута мы проверяем все ли верно
            local proc_table = decodeJson(result)
            if proc_table.ok then
                if #proc_table.result > 0 then
                    local res_table = proc_table.result[1]
                    if res_table then
                        if res_table.update_id ~= updateid then
                            updateid = res_table.update_id
                            local message_from_user = res_table.message.text
                            if message_from_user then
                                -- и тут если чел отправил текст мы сверяем
                                local text = u8:decode(message_from_user) .. ' ' --добавляем в конец пробел дабы не произошли тех. шоколадки с командами(типо чтоб !q не считалось как !qq)
                                if text:match('^!qq') then
                                    sendTelegramNotification('Ку')
                                elseif text:match('^!q') then
                                    sendTelegramNotification('Привет!')
                                elseif text:match('^!radius') then
                                    sendTelegramNotification('Игроки в радиусе:')
                                    sendigrokradiusTg()
                                elseif text:match('^!status') then
                                    sendStatusTg()
                                elseif text:match('^!stats') then
                                    sampSendChat('/stats')
                                    text = sampGetDialogText()
                                    sendTelegramNotification(text)
                                 wait(50)  sampCloseCurrentDialogWithButton(0)
                                    
                                else
                                    sendTelegramNotification('Неизвестная команда!')
                                end
                            end
                        end
                    end
                end
            end
        end
    end
end)
end
хм
 

sadasdasdasdasdasd

Известный
Автор темы
88
19
Lua:
function processing_telegram_messages(result) -- функция проверОчки того что отправил чел
  lua_thread.create(function()
    if active.v then
        if result then
            -- тута мы проверяем все ли верно
            local proc_table = decodeJson(result)
            if proc_table.ok then
                if #proc_table.result > 0 then
                    local res_table = proc_table.result[1]
                    if res_table then
                        if res_table.update_id ~= updateid then
                            updateid = res_table.update_id
                            local message_from_user = res_table.message.text
                            if message_from_user then
                                -- и тут если чел отправил текст мы сверяем
                                local text = u8:decode(message_from_user) .. ' ' --добавляем в конец пробел дабы не произошли тех. шоколадки с командами(типо чтоб !q не считалось как !qq)
                                if text:match('^!qq') then
                                    sendTelegramNotification('Ку')
                                elseif text:match('^!q') then
                                    sendTelegramNotification('Привет!')
                                elseif text:match('^!radius') then
                                    sendTelegramNotification('Игроки в радиусе:')
                                    sendigrokradiusTg()
                                elseif text:match('^!status') then
                                    sendStatusTg()
                                elseif text:match('^!stats') then
                                    sampSendChat('/stats')
                                    text = sampGetDialogText()
                                    sendTelegramNotification(text)
                                 wait(50)  sampCloseCurrentDialogWithButton(0)
                                   
                                else
                                    sendTelegramNotification('Неизвестная команда!')
                                end
                            end
                        end
                    end
                end
            end
        end
    end
end)
end
хм
-, не работает, мб у меня какая та библиотека не подключена?


Lua:
local inicfg = require('inicfg')
require "lib.moonloader"
local keys = require ('vkeys')
local imgui = require('imgui')
local encoding = require('encoding')
local fa = require ('fAwesome5')
local huy = require("samp.events")
local mem = require ("memory")
local effil = require("effil")
local today_time = os.date("%M:%S")
encoding.default = 'CP1251'                     
u8 = encoding.UTF8