ищу скрипт

WellMay

Известный
Автор темы
939
311
Версия SA-MP
  1. 0.3.7-R3
ищу скрипт который каждые минут 5 будет нажимать альт и прожимать кнопку с текстом "Далее" в диалоге

ап
 
Последнее редактирование:

Feykomet

Участник
149
12
Последнее редактирование:

WellMay

Известный
Автор темы
939
311
скинь как выглядит диалог
(Скриншот)
1719860365760.png
 

chromiusj

Стань той переменой, которую хочешь увидеть в мире
Модератор
5,739
4,044
Lua:
local sampev = require('lib.samp.events')
local state = false
local timer = os.clock()
function main()
    while not isSampAvailable() do wait(0) end
    sampRegisterChatCommand('gomunkul',function ()
        state = not state
        printStringNow(state and 'gomunkul' or '306',1500)
    end)   
    while true do
        wait(0)
        if state then
            if os.clock()-timer > 60*5 then
                setGameKeyState(21, 255)
                timer = os.clock()
            end
        end
    end
end
function sampev.onShowDialog(dialogId, style, title, button1, button2, text)
    if state then
        if title:find('Банковский пост') or title:find('{.-}Банковский пост') then
            lua_thread.create(function ()
                wait(300)
                sampSendDialogResponse(dialogId,1,0,'')
            end)
            return false
        end
    end
end
попробуй, не тестил
 

WellMay

Известный
Автор темы
939
311
Lua:
local sampev = require('lib.samp.events')
local state = false
local timer = os.clock()
function main()
    while not isSampAvailable() do wait(0) end
    sampRegisterChatCommand('gomunkul',function ()
        state = not state
        printStringNow(state and 'gomunkul' or '306',1500)
    end)  
    while true do
        wait(0)
        if state then
            if os.clock()-timer > 60*5 then
                setGameKeyState(21, 255)
                timer = os.clock()
            end
        end
    end
end
function sampev.onShowDialog(dialogId, style, title, button1, button2, text)
    if state then
        if title:find('Банковский пост') or title:find('{.-}Банковский пост') then
            lua_thread.create(function ()
                wait(300)
                sampSendDialogResponse(dialogId,1,0,'')
            end)
            return false
        end
    end
end
попробуй, не тестил
спасибо а на какой строке менять задержку по времени? через какое время он будет прожимать альт и диалог?

Lua:
local sampev = require('lib.samp.events')
local state = false
local timer = os.clock()
function main()
    while not isSampAvailable() do wait(0) end
    sampRegisterChatCommand('gomunkul',function ()
        state = not state
        printStringNow(state and 'gomunkul' or '306',1500)
    end)  
    while true do
        wait(0)
        if state then
            if os.clock()-timer > 60*5 then
                setGameKeyState(21, 255)
                timer = os.clock()
            end
        end
    end
end
function sampev.onShowDialog(dialogId, style, title, button1, button2, text)
    if state then
        if title:find('Банковский пост') or title:find('{.-}Банковский пост') then
            lua_thread.create(function ()
                wait(300)
                sampSendDialogResponse(dialogId,1,0,'')
            end)
            return false
        end
    end
end
попробуй, не тестил
автоальт работает, а вот диалог не прожимате

спасибо а на какой строке менять задержку по времени? через какое время он будет прожимать альт и диалог?


автоальт работает, а вот диалог не прожимате
1719914149617.png
 
Последнее редактирование:

plalkeo

Известный
829
330

MLycoris

На вид оружие массового семяизвержения
Проверенный
1,981
2,189
хз тогда попробуй такой вариант
Lua:
local st = false
function main()
    sampRegisterChatCommand('posttt',function()
        st = not st
    end)
    while true do wait(0)
        if st then
            setGameKeyState(21, 255)
            repeat wait(100) until sampIsDialogActive()
            sampCloseCurrentDialogWithButton(1)
            wait(300000)
        end
    end
end