Choosing a random player of a team
#4

Supposing that you have stored player team in
Код:
new gTeam[MAX_PLAYERS]
pawn Код:
//Whenever you want to select random player
new rP;
for(;;)
{
    rP = random(GetMaxPlayers());
    if(!IsPlayerConnected(rP) || gTeam[rP] != TEAM_DEFENDER) continue;
    break;
}
Reply


Messages In This Thread
Choosing a random player of a team - by KingyKings - 16.09.2012, 08:56
Re: Choosing a random player of a team - by Sig Hansen - 16.09.2012, 09:26
Re: Choosing a random player of a team - by Glint - 16.09.2012, 09:28
Re: Choosing a random player of a team - by [MM]RoXoR[FS] - 16.09.2012, 10:05

Forum Jump:


Users browsing this thread: 3 Guest(s)