- 9
- 0
function main()
repeat wait(0) until isSampAvailable()
wait(2000)
sampRegisterChatCommand("dialog", dialog)
sampAddChatMessage("Loaded", -1)
while true do
wait(0)
end
end
function dialog()
sampShowDialog(1337,'{FF5656}Заголовок','{FFFFFF}Приветствую тебя.\nКак дела?','Приветствую','Досвидания',0)
lua_thread.create(checker)
end
function checker()
while sampIsDialogActive()
wait(0)
local result, button, list, input = sampHasDialogRespond(1337)
if result and button == 1
sampAddChatMessage('Как дела',-1)
elseif result and button == 0 then
sampAddChatMessage('Я на тебя обиделся, уходи!',-1)
end
end
end
repeat wait(0) until isSampAvailable()
wait(2000)
sampRegisterChatCommand("dialog", dialog)
sampAddChatMessage("Loaded", -1)
while true do
wait(0)
end
end
function dialog()
sampShowDialog(1337,'{FF5656}Заголовок','{FFFFFF}Приветствую тебя.\nКак дела?','Приветствую','Досвидания',0)
lua_thread.create(checker)
end
function checker()
while sampIsDialogActive()
wait(0)
local result, button, list, input = sampHasDialogRespond(1337)
if result and button == 1
sampAddChatMessage('Как дела',-1)
elseif result and button == 0 then
sampAddChatMessage('Я на тебя обиделся, уходи!',-1)
end
end
end