Skip to content

Creating Basic Tasks

Alexander edited this page Mar 13, 2019 · 1 revision

Here we will create some tasks that will wait or loop a function.

//Arguments:
//1st function name
//2nd Time, 20 tick = 1 second
manager.createTask("tasknormal", 60*20);

function tasknormal(currentTick){
    server.broadcastMessage("Hello, I have been executed 60 seconds after i was registered!");
}

//Arguments:
//1st function name
//2nd Time, 20 tick = 1 second
manager.createLoopTask("taskloop", 60*20);

function taskloop(currentTick){
    server.broadcastMessage("Hello, I'm being executed every 60 seconds!");
}
Clone this wiki locally