Based on the code above:
PHP Code:
new playersCount[3] Players[32],pnum;
get_players( Players, pnum , "a" ); //only alive players
for( new i =0; i < pnum; i++ )
{
playersCount[get_user_team(Players[i])]++
}
new Float:ratio = playersCount[1] / (playersCount[1]+playersCount[2])
Edit:
in the code above i'm calculating the ratio of T players per alive players. What makes that if there are 5 T's and 10 Ct's it will give 0.3(3). But, you just want the ratio of T's per Ct's so the way you doing is correct
PHP Code:
new Float:ratio = playersCount[1] / playersCount[2]
It would give 0.5
__________________