Not work -.- can you fix it? On my cs2d the lua script is not working
if not antispam then antispam = {}
antispam.blocked = {}
function antispam.unblock(id)
antispam.blocked[tonumber(id)] = nil
end
function antispam.generic(id)
if blocked[id] then << ERROR
return 1
else
blocked[id] = true
timer(200, "unblock", tostring(id))
end
end
addhook("say", "antispam.generic")
addhook("sayteam", "antispam.generic")
It seems like a very good Lua to prevent massive spam and to avoid getting flooded by joining players of a server that make use of excessive typing in short period of time. Great work, Flood. Very useful script!