Timer ploblem

I have a problem with a timer.
I want the timer to run even when noone is on the server. Couse its checking for bans and it needs to run constantly.
Please help.

I think you could do something like this:
local function CheckBan(ply, sid)
if ply:IsBanned() then – NOT a real function just so you get it.
–He didnt get in
–The player got in
hook.Add(“PlayerAuthed”, “CheckBan”, CheckBan)

You should not use a timer for it. It better to check on player join. (This MIGHT be wrong. Typed in the reply box.) But something like that should work I think. :slight_smile:

Its a timer thats retrieves the ban table from the mysql database so that wont work.
-removed code-

Why are you retrieving the table in a timer? You only need to retrieve it when you need it (when a player joins).

I retrive it couse if i do when the player joins it sometimes to slow and the player will be kicked and if i ban a person he can join couse its using the last query result for some strange reason. So i solved it this way but the timer wont run when noone is on the server.