22.10.2017, 11:46
(
Last edited by pawnoholic; 23/10/2017 at 11:12 AM.
)
Quote:
It should be like this tho:
PHP Code:
|
My not recursive version:
PHP Code:
ReturnRandomPlayer()
{
new
lastPlayer = GetPlayerPoolSize();
for (new i = random(lastPlayer + 1); i < lastPlayer; i++)
{
if (IsPlayerConnected(i))
{
return i;
}
}
return -1;
}