[Pawn] Random Player - Printable Version + open.mp forum (https://forum.open.mp) -- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3) --- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10) --- Thread: [Pawn] Random Player (/showthread.php?tid=1704) |
Random Player - Lord_Bukake - 2021-02-23 Hi, how can i randomly select a player and have it run once per game? i have a TDM server for rounds and i need it to run only once per game This is my code: Code: new ran = random(GetPlayerPoolSize()); The problem is that it runs more than once, can you help me please?, thanks RE: Random Player - destiezk - 2021-02-23 Code: stock GetRandomPlayer() RE: Random Player - Radical - 2021-02-23 Use foreach and Y_Iterate. PHP Code: new random_player = Iter_Random(Player); RE: Random Player - Lord_Bukake - 2021-02-24 It works! Thanks a lot |