About y_iterate
#2

Iter_Init should be called once when the mode starts (in OnGameModeInit/OnFilterScriptInit). If you use the latest version of YSI 4, a player can belong to only 1 job so you can use the optimized version of multi-iterator:
pawn Код:
new Iterator:Job<MAX_JOB, MAX_PLAYERS>;
in this case, you do not need to use Iter_Init function. The only difference except the MAX_JOB + MAX_PLAYERS instead of MAX_JOBS * MAX_PLAYERS is the usage. In the old version, you would use:
pawn Код:
foreach (new i : Job[job_id])
which now becomes:
pawn Код:
foreach (new i : Job<job_id>)
For more information: https://sampforum.blast.hk/showthread.php?tid=571159
Reply


Messages In This Thread
About y_iterate - by None1337 - 23.12.2017, 21:44
Re: About y_iterate - by Konstantinos - 24.12.2017, 08:09

Forum Jump:


Users browsing this thread: 1 Guest(s)