Random player from group - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Random player from group (
/showthread.php?tid=654338)
Random player from group -
Cubie - 26.05.2018
I've been fighting with what sounds to be simple thing but I cant figure it out.
I'd like to select a random player from all the players that have:
Gamemode[playerid] = 1.
or
Gamemode[playerid] = 3.
Etc. Etc.
I.e:
Playerid 1,5,7,9 have Gamemode[playerid] = 1, so I want a random player from that group.
It's probably pretty easy but I need someone to push me into the right direction.
Thanks.