Quote:
Originally Posted by Nero_3D
PHP код:
GetRandomPlayerInTeam(teamid) {
new
count,
player[MAX_PLAYERS],
i = GetPlayerPoolSize()
;
while(i >= 0) { // set gTeam to an invalid value in OnPlayerDisconnect to
if(gTeam[i] == teamid) { // avoid the additional call to IsPlayerConnected
player[count++] = i;
}
i--;
}
return count ? player[random(count)] : INVALID_PLAYER_ID;
}
|
I just want to Player ID.
Not for the team.