Choosing a random player of a team
#1

Can you help. I need to script it so when the player spawns it will freeze them (already done) and then after a timer it will select a random person off the Defenders team and takes there name but not off the Invaders team.

Much appreciated!
Reply
#2

Download GameMode And Edit It....
Reply
#3

Quote:
Originally Posted by Sig Hansen
Посмотреть сообщение
Download GameMode And Edit It....
What does that have to do with anything ?
Reply
#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


Forum Jump:


Users browsing this thread: 2 Guest(s)