How to loop all players? - my code is not working - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Plugins (https://forum.cuberite.org/forum-1.html) +--- Forum: Plugin Discussion (https://forum.cuberite.org/forum-8.html) +--- Thread: How to loop all players? - my code is not working (/thread-3351.html) |
How to loop all players? - my code is not working - _XxFedexX_ - 04-13-2021 Code: function OnTick(TickTime) Code: cPluginManager:AddHook(cPluginManager.HOOK_TICK, OnTick); Console is not giving any error. Thank you very much! RE: How to loop all players? - my code is not working - NiLSPACE - 04-13-2021 The reason it's not working is because all you're doing is declaring a variable named 'ForEachPlayerTick' and putting a function in it. To execute it you have to call 'cRoot:Get():ForEachPlayer(ForEachPlayerTick)' |