Choose a random player ?
#5

I wouldn't use that, that'll end in the first 5-10 players every time.

This could work, I'm half asleep and wrote this in this quick reply box so anything can happen:
pawn Код:
new playaz[MAX_PLAYERS], count;

for(new i; i < MAX_PLAYERS; i++)
{
    if(IsPlayerConnected(i))
    {
        playaz[count] = i;
        count++;
    }
}

new rand = playaz[random(count)];
Reply


Messages In This Thread
Choose a random player ? - by Kitten - 04.08.2010, 23:20
Re: Choose a random player ? - by Finn - 04.08.2010, 23:22
Re: Choose a random player ? - by PotH3Ad - 04.08.2010, 23:27
Re: Choose a random player ? - by Kitten - 04.08.2010, 23:27
Re: Choose a random player ? - by Finn - 04.08.2010, 23:31
Re: Choose a random player ? - by Kitten - 04.08.2010, 23:32
Re: Choose a random player ? - by Kitten - 04.08.2010, 23:35
Re: Choose a random player ? - by Finn - 04.08.2010, 23:36
Re: Choose a random player ? - by Kitten - 04.08.2010, 23:38
Re: Choose a random player ? - by Finn - 04.08.2010, 23:43

Forum Jump:


Users browsing this thread: 1 Guest(s)