17.10.2016, 19:08
Iterator always will be the fastest - just remember to add and remove values from it to not get wonky stuff. You've said that you'll do it for 30 systems. I guess a player can be at most in 1 of those at once (i.e Player in GunGame can't play WarGame at the same time). If you are using latest YSI, you can reduce memory used too:
This way you'll only use E_GAME + MAX_PLAYERS cells, not E_GAME * MAX_PLAYERS.
pawn Код:
enum E_GAME
{
E_GAME_WAR,
E_GAME_GUN,
//etc.
}
new Iterator:GamePlayer<_:E_GAME, MAX_PLAYERS>;
//then
foreach(new playerid:GamePlayer<_:E_GAME_WAR>)