Jump to content

Timer


drew4452862

Recommended Posts

local timer = Timer()
local pastTime = 0

function initialize()
timer:start()
tellPlayers("starting timer")
while timer.seconds < 10 do
	local currentTime = timer.seconds
	if currentTime > pastTime then
		tellPlayers(timer.seconds)
	end
	pastTime = timer.seconds
end
end

function tellPlayers (message)
local players = {Sector():getPlayers()}
    for _, player in pairs(players) do
    	player:sendChatMessage("Server", 0, message)
    end
end

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...