- Версия MoonLoader
- .026-beta
Никак не могу зделать так что бы при виде моего ответа на репорт, скрипт останавливался примерная строка [A] Ник_Администратора[182] » Ник_Репортера[207]:
Вот примерная робота, но он отключаеться после каждого репорта, даже если скрипт не успел словить репорт , было куча разных кодов и по ид диалога, никак не работает
require 'lib.moonloader'
local sampev = require 'lib.samp.events'
local vkeys = require 'vkeys'
local encoding = require 'encoding'
local active = true -- Флаг, указывающий, включен ли скрипт
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(0x06) and not isSampfuncsConsoleActive() and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() then
active = not active
printStyledString('PEбOPT: '..(active and '~g~ШA' or '~r~HET'), 5000, 6)
end
end
end
function sampev.onServerMessage(color, text)
if active and text:find('%[Репорт%] от (%w+_%w+)%[(%d+)%]:') then
sampSendChat('/ot')
active = false
return
end
end
Вот примерная робота, но он отключаеться после каждого репорта, даже если скрипт не успел словить репорт , было куча разных кодов и по ид диалога, никак не работает
require 'lib.moonloader'
local sampev = require 'lib.samp.events'
local vkeys = require 'vkeys'
local encoding = require 'encoding'
local active = true -- Флаг, указывающий, включен ли скрипт
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(0x06) and not isSampfuncsConsoleActive() and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() then
active = not active
printStyledString('PEбOPT: '..(active and '~g~ШA' or '~r~HET'), 5000, 6)
end
end
end
function sampev.onServerMessage(color, text)
if active and text:find('%[Репорт%] от (%w+_%w+)%[(%d+)%]:') then
sampSendChat('/ot')
active = false
return
end
end