Toribash
View Poll Results: Found this usefull?
Very very usefull.
1 Votes / 16.67%
yes
3 Votes / 50.00%
nice, but not so.
0 Votes / 0%
no
2 Votes / 33.33%
Voters: 6. You may not vote on this poll
View Poll Results

Original Post
[REL]Never AFK
it was requested(http://forum.toribash.com/showthread.php?p=2339251#post2339251). now i post.
u must be operator of a server.
idk why but he wanted them never be afk.
here i will post the script =D
--[[
Anti-Afk Server.
make ppl never be afk
]]
spamcount= 0
 
function entframe()
spamcount= 0
local spec= get_spectators()
  for i=0, table.getn(spec) do
    if spamcount < 3 then
      run_cmd("fenter " .. spec[i])
      spamcount= spamcount + 1
    else
      echo("Spam Reached, wait till next freeze")
    end
  end
end
 
function start()
  echo("Anti-Afk Server Started.")
end
start()
add_hook("enter_frame", "ef", entframe)
Tabbed out your code for legibility ~Eleeleth
Last edited by Eleeleth; Feb 18, 2010 at 10:25 PM. Reason: fail gramar