Don't use that method anyway, though it seems the most common sense way to do it.
Before I give you updated code, I have to question why the hell you'd be looping this. That's a bad idea and needless to boot. Do you want to know the current T count at any given moment?
This code will give you the T count:
Code:
new players[32], playerCnt, playerIdx, terroristCnt;
get_players(players, playerCnt);
for (playerIdx = 0; playerIdx < playerCnt; playerIdx++)
{
if (get_user_team(players[playerIdx]) == 2)
{
terroristCnt++;
}
}
You'll need to confirm if terrorists are team 1 or 2 as I can't recall at the moment.
__________________