16.09.2018, 02:21
You can make use of iterators in y_iterate.
When player enters event use Iter_Add
Now for selecting random ids use Iter_Random
When player leaves event use Iter_Remove
When event ends clear iterator using Iter_Clear
PHP код:
new Iterator:PlayersInEvent<MAX_PLAYERS>;
PHP код:
Iter_Add(PlayersInEvent,playerid);
PHP код:
new randomid = Iter_Random(PlayersInEvent);
PHP код:
Iter_Remove(PlayersInEvent,playerid);
PHP код:
Iter_Clear(PlayersInEvent);