14.11.2010, 23:29
Do you want the infected player to be random?
pawn Код:
stock GetRandomPlayer() // No idea who wrote it..
{
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];
}