View Single Post
mlibre
Veteran Member
Join Date: Nov 2015
Location: return PLUGIN_CONTINUE
Old 04-16-2024 , 08:17   Re: Choosing a random player
Reply With Quote #8

Quote:
Originally Posted by WATCH_D0GS UNITED View Post
Based on what its said, it doesn't matter:
----------------------------------

native random(max);

Description

Returns a random number between 0 and a specified upper bound.

----------------------------------
so if there are 3 players, let's say, you can throw a larger random number like 4 you mean

Quote:
Originally Posted by tedaimlocks View Post
...run time error 4 : index out of bounds
test

Code:
public ChooseHero() {     // Choose a random player every round and give them the stuff under         new players[32], num; get_players(players, num, "a")         if( !num )     {         return     }         //... }
__________________

Last edited by mlibre; 04-16-2024 at 08:24.
mlibre is offline