better to replace? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: better to replace? (
/showthread.php?tid=511886)
better to replace? -
Rhymed32 - 08.05.2014
better to replace:
PHP код:
for(new i = 0; i < MAX_PLAYERS; i++)
Re: better to replace? -
Calgon - 08.05.2014
Is your question: are there better alternatives to running a for loop to cycle through players? Yes.
foreach is a good replacement for this, providing you fully read the post so you can grasp a full understanding of how it works.
Re: better to replace? -
SickAttack - 08.05.2014
Foreach is better.
Re: better to replace? -
Rhymed32 - 08.05.2014
that is:
PHP код:
foreach(new i : Player)
?
Re: better to replace? -
Calgon - 08.05.2014
Quote:
Originally Posted by Rhymed32
that is:
PHP код:
foreach(new i : Player)
?
|
Read the post and you will understand it.