- 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