[Tutorial] Set Max Players to Server's Max Players
#7

That loop can easily be optimised as follows:
PHP код:
for(new 0GetPlayerPoolSize(); <= ji++) 
In this slightly optimised loop above, the function 'GetPlayerPoolSize()' will not be called every single iteration. It is called upon creating j -- which is when the loop is initialised -- and therefore will improve its performance. It's an easy optimisation and a good habit.
It's redundant when you have only one loop in your script, but imagine a gamemode with hundreds if not thousands of unoptimised loops.
Reply


Messages In This Thread
Changing MAX_PLAYERS value & Another way to loop. - by illuminati2 - 04.03.2016, 20:11
Re: Set Max Players to Server's Max Players - by Sascha - 04.03.2016, 20:25
Re: Set Max Players to Server's Max Players - by illuminati2 - 04.03.2016, 20:36
Re: Set Max Players to Server's Max Players - by Sascha - 04.03.2016, 20:52
Re: Set Max Players to Server's Max Players - by Crayder - 04.03.2016, 20:57
Re: Set Max Players to Server's Max Players - by illuminati2 - 04.03.2016, 20:58
Re: Set Max Players to Server's Max Players - by AndySedeyn - 05.03.2016, 06:58

Forum Jump:


Users browsing this thread: 1 Guest(s)