getrandom player function not working?
#2

pawn Код:
stock GetRandomPlayer()
{
    new yplayer[MAX_PLAYERS+1];
    for (new y = 0; y != MAX_PLAYERS; y ++) {
        if (IsPlayerConnected(y)) {
            yplayer[0] ++;
            yplayer[yplayer[0]] = y;
        }
    }
    return yplayer[random(yplayer[0])+1];
}
Reply


Messages In This Thread
getrandom player function not working? - by The_Gangstas - 21.12.2010, 15:39
Re: getrandom player function not working? - by Seven. - 21.12.2010, 15:40
Re: getrandom player function not working? - by The_Gangstas - 21.12.2010, 15:45
Re: getrandom player function not working? - by Seven. - 21.12.2010, 15:48

Forum Jump:


Users browsing this thread: 1 Guest(s)