19.07.2016, 09:37
foreach/y_iterate loops through connected players only, so basically it is recommended than normal loops as it uses lists. What Zeus666 posted is the old syntax which is not used anymore, the new syntax is:
with "i" being the iterator variable and "Player" the iterator for players (there are more iterators about NPCs, vehicles in the latest version and you can also make your own).
pawn Код:
foreach(new i : Player)