Help with some cmd's
#3

Never use return in loops unless intended to (same goes for cuzido's code). It will stop on the first iterator and it won't loop through the rest of the players.

Another recommendation is using foreach but if you don't want to, at least use the pool size added in 0.3.7
pawn Код:
foreach(new i : Player)
// or
for(new i = 0, j = GetPlayerPoolSize(); i <= j; i++)
Reply


Messages In This Thread
Help with some cmd's - by Uvais - 06.06.2016, 15:45
Re: Help with some cmd's - by cuzido - 06.06.2016, 15:54
Re: Help with some cmd's - by Konstantinos - 06.06.2016, 15:57
Re: Help with some cmd's - by Uvais - 06.06.2016, 16:21
Re: Help with some cmd's - by cuzido - 06.06.2016, 16:27
Re: Help with some cmd's - by Uvais - 06.06.2016, 16:39
Re: Help with some cmd's - by cuzido - 06.06.2016, 16:44
Re: Help with some cmd's - by Uvais - 07.06.2016, 14:43
Re: Help with some cmd's - by Uvais - 08.06.2016, 07:08
Re: Help with some cmd's - by BornHuman - 08.06.2016, 07:14

Forum Jump:


Users browsing this thread: 1 Guest(s)