Jelly 0 Report post Posted May 28, 2016 Hi, is there a way to script portals to close when the amount of players have reached the determined amount? thanks Quote Share this post Link to post Share on other sites
Sultan 68 Report post Posted May 28, 2016 (edited) ctrl.lua (all way on TOP) if(MAPNAME_init == nil)then MAPNAME_init = function() maxEntry = 10; closedEntry = false; end end Find & add this inside map_copy_run_MAPNAME local count = GetMapCopyPlayerNum(map_copy) if(closedEntry ~= true and count >= maxEntry)then CloseMapEntry('MAPNAME') closedEntry = true Notice('MAPNAME portal vanished!') end Find & add this inside map_copy_before_close_MAPNAME MAPNAME_init(); Note: You can also use "CloseMapCopy" to close map completely at any time you want. Edited May 28, 2016 by Sultan 1 Quote Share this post Link to post Share on other sites
Jelly 0 Report post Posted May 29, 2016 @Sultan hi sultan! thanks for the help! i wonder MAPNAME_init = function() why is it put that way? most scripts i see it starts with function instead. can u explain? thx Quote Share this post Link to post Share on other sites
Foxseiz 138 Report post Posted May 30, 2016 Check this explanation. Spoiler Quote Share this post Link to post Share on other sites
Jelly 0 Report post Posted May 30, 2016 1 hour ago, Foxseiz said: Check this explanation. Hidden Content i kinda understand what hes saying but i dont know why the reason to do it Quote Share this post Link to post Share on other sites
Jelly 0 Report post Posted May 30, 2016 @Foxseiz like what can u do with hooking that normal function cant Quote Share this post Link to post Share on other sites