What do you want to schedule? If you want to set a block after some ticks you can use QueueSetBlock. If you want to schedule a function... You can't
sorry. We do have an issue on github for it: https://github.com/mc-server/MCServer/issues/150
I did once create a plugin that counted down using OnTick and then execute it. You could maybe use the code from that:
sorry. We do have an issue on github for it: https://github.com/mc-server/MCServer/issues/150I did once create a plugin that counted down using OnTick and then execute it. You could maybe use the code from that:
Table = {}
function Initialize(Plugin)
PLUGIN = Plugin
Plugin:SetName("Scheduler")
Plugin:SetVersion(1)
cPluginManager.AddHook(cPluginManager.HOOK_TICK, OnTick)
return true
end
function Add(Function, Parameters, Ticks)
table.insert(Table, {Function, Parameters, Ticks})
end
function OnTick(Time)
for I=1, #Table do
if Table[I][4] < 0 then
Table[I][2](Table[I][3])
table.remove(Table, I)
else
Table[I][4] = Table[I][4] - 1
end
end
end

