Code:
players = getentarray("player", "classname");
list = [];
for(i = 0;i < players.size;i++)
	if(players[i].pers["team"] != "spectator")
		list[list.size] = players[i];

num = randomint(list.size);
commander = list[num];
iprintlnbold(commander.name + " is chosen to be the commander!");
commander thread docommander();





docommander()
{
         if(self.pers["team"] == "allies")
	{
        self.maxhealth = 180;
	self.health = self.maxhealth;
        //add what you want for commander.
	}
        if(self.pers["team"] == "axis")
        self.maxhealth = 1200;
        self.health = self.maxhealth
        //add what you want for commander.
        }
}
Okey,here is code for commander,and it choose all for commadner,how i can put to just 1 is commander?