Get online players ID
#3

Y_iterate (foreach) has a function for this.
Quote:
Originally Posted by foreach - 0.3 compatible - updated 19/12/12
Iter_Random(name)

Efficiently returns a random present value from the named iterator. Useful for selecting a random player.

Код:
new
	Iterator:Some<10>;
Iter_Add(Some, 5);
Iter_Add(Some, 9);
printf("%d", Iter_Random(Some));
Will print either "5" or "9".
Reply


Messages In This Thread
Get online players ID - by awoo - 04.03.2015, 16:21
Re: Get online players ID - by KayJ - 04.03.2015, 16:24
Re: Get online players ID - by CalvinC - 04.03.2015, 16:26
Re: Get online players ID - by PowerPC603 - 04.03.2015, 19:55
Re: Get online players ID - by ReshiramZekrom - 04.03.2015, 22:20

Forum Jump:


Users browsing this thread: 2 Guest(s)