setClockEvent


General

setClockEvent is a method running singleton (cross-server) event every selected period of the time.


Usage

Client:setClockEvent(<number> interval, <string> clockName, (number) clockInterval, <function> callback)
Returns: <HttpEvent> clockEvent

The callback function should use these arguments:
<string> clockName

It is a singleton function. It won't run on all the server - just a single one to avoid function event fired multiple times.


Limitations

See getActionEvent.


Example

Client:setClockEvent(5, "TestClock", 60000, function(name)
	print("Clock ran ", name, tick())
end)

Back to top