#6

No need to use MAX_PLAYERS even, SA-MP offers a native GetPlayerPoolSize() function. Say you have 100 player slots open, your highest player ID is 50. This means you loop through literally half of that, and is dynamic depending on the count in-game. Another way of looping is also through y_iterate and using "iters", which comes with its own pros and cons. See YSI if you're interested in learning about that.
Reply


Messages In This Thread
Loop - by KopeK - 18.12.2017, 18:20
Re: Loop - by aoky - 18.12.2017, 18:22
Re: Loop - by KopeK - 18.12.2017, 18:24
Re: Loop - by aoky - 18.12.2017, 18:26
Re: Loop - by 0x88 - 19.12.2017, 09:20
Re: Loop - by Abagail - 20.12.2017, 03:01

Forum Jump:


Users browsing this thread: 1 Guest(s)