LUA | скриптик

VRush

https://t.me/vrushscript
Автор темы
Проверенный
2,341
1,089
в диалоге 25012
выбираешь 7 пункт
кликаешь
далее 25013
и ок
 
  • Вау
  • Грустно
Реакции: ilovenuborp и rvng

VRush

https://t.me/vrushscript
Автор темы
Проверенный
2,341
1,089
скажи название пункта 7
1618816158763.png
 

_RaDley_

Известный
92
31
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
Не проверял, должно работать
 
  • Нравится
Реакции: Андрей72

VRush

https://t.me/vrushscript
Автор темы
Проверенный
2,341
1,089
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
Не проверял, должно работать
не робит брат
 

Pelmeska

Известный
925
234
Пробуй
Lua:
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
 

_RaDley_

Известный
92
31
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
 

Pelmeska

Известный
925
234
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
задержка нужна чтоб второй диалог открыть
 

VRush

https://t.me/vrushscript
Автор темы
Проверенный
2,341
1,089
задержка нужна чтоб второй диалог открыть
Код:
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
так?
 

Pelmeska

Известный
925
234
Код:
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 нужен поток )
 

_RaDley_

Известный
92
31
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
Я в игру зашел, проверить, работает
 

Pelmeska

Известный
925
234
даже диалог не выбирает
чуть изменил, только что проверил на своих диалогах - все работает, возможно ты нам сказал неверные ид диалогов\пункта
Lua:
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