PDA

View Full Version : counting function + loop =) help



xulikav
14th September 2016, 18:26
i wanna make function that count if there are 2 players axis and one 0 allies
if so make new round

voron00
14th September 2016, 19:15
calcNumOnTeam(team)
{
arrayteam = [];
players = getentarray("player", "classname");

for(i = 0; i < players.size; i++)
{
if(isDefined(players[i].pers["team"]) && players[i].pers["team"] == team)
arrayteam[arrayteam.size] = players[i];
}

return arrayteam.size;
}


if (calcNumOnTeam("axis") == 2 && calcNumOnTeam("allies") == 1)
{
// whatever
}

xulikav
14th September 2016, 19:20
thank you i love you last small help how to remove hud image from the screen of cod?

IzNoGoD
14th September 2016, 20:00
Find the hud, then disable it.