function main()
while not isSampAvailable() do wait(200) end
sampRegisterChatCommand("lecture",lecture)
while true do
wait(0)
end
end
function lecture()
stopThread = true
sampShowDialog(1999, "{0633E5}Тестовое окно", string.format("{FFFFFF}1.Тест1.\n2.Тест2."), "Выбрать", "Отмена", 2)
lua_thread.create(function()
wait(100)
stopThread = false
repeat
wait(0)
local result, button, list, input = sampHasDialogRespond(1999)
if result then
if button == 1 then -- Если кнопка выбрать
if list == 0 then -- тест1
sampSendChat('Твоё сообщение')
end
if list == 1 then -- тест2...