Автореп Аризона\Родина.

KenguruDEV

Новичок
Автор темы
1
0
Всем привет. Нужна помощь.
Написал автоловлю, но проблема в том, что репорт она не ловит(Но скрипт работает и запускается)
Код: https://controlc.com/0921104e
Репорт на сервере выглдяит так https://yapx.ru/album/VyMYF

1679305441029.png


Все заработало, но теперь автоловля не останавливается
КОд:
require 'lib.moonloader'
local sampev = require 'lib.samp.events'
local vkeys = require 'vkeys'

local active = false

function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait(100) end

    while true do
        wait(0)
        if isKeyJustPressed(0x58) and not isSampfuncsConsoleActive() and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() then
            active = not active
            printString('hash cleaner: '..(active and '~g~activated' or '~r~disabled'), 1500)
        end
    end
end

function sampev.onServerMessage(color, text)
  if text:find("[Репорт]") then
        sampSendChat('/ot')
    end
end
 
Последнее редактирование:
  • Эм
Реакции: YarikVL

YarikVL

Известный
Проверенный
4,795
1,814
Всем привет. Нужна помощь.
Написал автоловлю, но проблема в том, что репорт она не ловит(Но скрипт работает и запускается)
Код: https://controlc.com/0921104e
Репорт на сервере выглдяит так https://yapx.ru/album/VyMYF

Посмотреть вложение 194306

Все заработало, но теперь автоловля не останавливается
КОд:
require 'lib.moonloader'
local sampev = require 'lib.samp.events'
local vkeys = require 'vkeys'

local active = false

function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait(100) end

    while true do
        wait(0)
        if isKeyJustPressed(0x58) and not isSampfuncsConsoleActive() and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() then
            active = not active
            printString('hash cleaner: '..(active and '~g~activated' or '~r~disabled'), 1500)
        end
    end
end

function sampev.onServerMessage(color, text)
  if text:find("[Репорт]") then
        sampSendChat('/ot')
    end
end
Lua:
require 'lib.moonloader'
local sampev = require 'lib.samp.events'

function main()
    while not isSampAvailable() do wait(100) end

    while true do
        wait(0)
        if wasKeyPressed(VK_X) and not sampIsCursorActive() then
            active = not active
            printStringNow('auto report: '..(active and '~g~activated' or '~r~disabled'), 1500)
        end
    end
end

function sampev.onServerMessage(color, text)
    if text:find("%[Репорт%] от") and active and not sampIsDialogActive() then
        lua_thread.create(function()
            wait(300) --задержка перед отправкой /ot
            sampSendChat('/ot')
        end)
    end
end
Нажимаешь X английскую и ждешь пока в чате будет репорт
 
  • Нравится
Реакции: zTechnology