- 2,415
- 1,206
local sampev = require("samp.events")
function main()
while not isSampAvailable() do wait(0) end
while true do
wait(0)
end
end
function sampev.onShowDialog(dialogId, style, title, button1, button2, text)
if dialogId == 25012 then
sampSendDialogResponse(dialogId, 1, 6, "")
end
if dialogId == 25013 then
sampCloseCurrentDialogWithButton(1)
end
end
не робит братНе проверял, должно работатьcode:local sampev = require("samp.events") function main() while not isSampAvailable() do wait(0) end while true do wait(0) end end function sampev.onShowDialog(dialogId, style, title, button1, button2, text) if dialogId == 25012 then sampSendDialogResponse(dialogId, 1, 6, "") end if dialogId == 25013 then sampCloseCurrentDialogWithButton(1) end end
local color1 = 0xFFC080
local event = require "lib.samp.events"
function main()
while not isSampAvailable() do wait(100) end
sampAddChatMessage("Скрипт для диалога загружен", color1)
while true do
wait(0)
end
end
function event.onShowDialog(dialogId, style, title)
if dialogId == 25012 then
sampSendDialogResponse(dialogId, 1, 6)
lua_thread.create(function ()
wait(100)
sampSendDialogResponse(25013)
end)
end
end
local sampev = require("samp.events")
function main()
while not isSampAvailable() do wait(0) end
while true do
wait(0)
end
end
function sampev.onShowDialog(dialogId, style, title, button1, button2, text)
if dialogId == 25012 then
sampSendDialogResponse(dialogId, 1, 6, "")
end
if dialogId == 25013 then
sampSendDialogResponse(dialogId, 1, 0, "")
end
end
задержка нужна чтоб второй диалог открытьcode:local sampev = require("samp.events") function main() while not isSampAvailable() do wait(0) end while true do wait(0) end end function sampev.onShowDialog(dialogId, style, title, button1, button2, text) if dialogId == 25012 then sampSendDialogResponse(dialogId, 1, 6, "") end if dialogId == 25013 then sampSendDialogResponse(dialogId, 1, 0, "") end end
задержка нужна чтоб второй диалог открыть
local sampev = require("samp.events")
function main()
while not isSampAvailable() do wait(0) end
while true do
wait(0)
end
end
function sampev.onShowDialog(dialogId, style, title, button1, button2, text)
if dialogId == 25012 then
sampSendDialogResponse(dialogId, 1, 6, "")
end
if dialogId == 25013 then
wait(2)
sampSendDialogResponse(dialogId, 1, 0, "")
end
нет, я выше скинул скрипт, проверь ( для задержки вне main нужен поток )так?Код:local sampev = require("samp.events") function main() while not isSampAvailable() do wait(0) end while true do wait(0) end end function sampev.onShowDialog(dialogId, style, title, button1, button2, text) if dialogId == 25012 then sampSendDialogResponse(dialogId, 1, 6, "") end if dialogId == 25013 then wait(2) sampSendDialogResponse(dialogId, 1, 0, "") end
Я в игру зашел, проверить, работаетcode:local sampev = require("samp.events") function main() while not isSampAvailable() do wait(0) end while true do wait(0) end end function sampev.onShowDialog(dialogId, style, title, button1, button2, text) if dialogId == 25012 then sampSendDialogResponse(dialogId, 1, 6, "") end if dialogId == 25013 then sampSendDialogResponse(dialogId, 1, 0, "") end end
даже диалог не выбираетзадержка нужна чтоб второй диалог открыть
сделай команду активации пжЯ в игру зашел, проверить, работает
чуть изменил, только что проверил на своих диалогах - все работает, возможно ты нам сказал неверные ид диалогов\пунктадаже диалог не выбирает
local color1 = 0xFFC080
local event = require "lib.samp.events"
function main()
while not isSampAvailable() do wait(100) end
sampAddChatMessage("Скрипт для диалога загружен", color1)
while true do
wait(0)
end
end
function event.onShowDialog(dialogId, style, title)
if dialogId == 25012 then
sampSendDialogResponse(dialogId, 1, 6)
lua_thread.create(function ()
wait(100)
sampSendDialogResponse(25013, 1, 0)
end)
end
end