How to moderate a server
#2
Code:
banned = {"NameHere", "AnotherNameHere"}

function in_table ( e, t )
    for _,v in pairs(t) do
        if (v==e) then return true end
    end
    return false
end

link(game.Players.ChildAdded, function(p)
    if in_table(p.Name, banned) then
        p:message("You're banned!'")
        p:remove()
        game:message(p.Name.." tried to join, but is banned.")
        sleep(3)
        game:message()
    end
end)
Reply


Messages In This Thread
How to moderate a server - by BuildistGuard - 01-09-2011, 06:23 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)