local ev = require 'samp.events'
function main()
while not isSampAvailable() do wait(0) end
sampRegisterChatCommand('autotrade', function()
state = not state
sampAddChatMessage(state and 'Вкл' or 'Выкл', -1)
end)
while true do
wait(0)
end
end
function ev.onShowDialog(id, style, title, button1, button2, text)
if text:find("10 секунд") and title:find("Торговля") then
sampSendDialogResponse(id,1,65535,"")
end
end