local text, time
local thread = lua_thread.create_suspended(function ()
while true do
sampSendChat(text)
wait(time*1000)
end
end)
function main()
while not isSampAvailable() do wait(0) end
sampRegisterChatCommand('flood', function (arg)
if thread:status() == 'yielded' then
thread:terminate()
return
end
text, time = arg:match('(.+) (%d+)')
if not text then
sampAddChatMessage('use: /flood text wait (in seconds)', -1)
return
end
thread:run()
end)
wait(-1)
end