View Single Post
Leonardo
Veteran Member
Join Date: Feb 2010
Location: 90's
Old 04-27-2012 , 14:30   Re: [TF2] Get Alive Players Count
Reply With Quote #4

Quote:
Originally Posted by Otokiru View Post
If GetAlivePlayers on blueTeam == 1 {
do something;
}
add this in .sp
Code:
stock GetTeamAliveCount( iTeamNum )
{
    new iCount;
    for( new iClient = 1; iClient <= MaxClients; iClient++ )
        if( IsClientInGame( iClient ) && GetClientTeam( iClient ) == iTeamNum && IsPlayerAlive( iClient ) )
            iCount++;
    return iCount;
}
__________________

Last edited by Leonardo; 04-28-2012 at 01:41.
Leonardo is offline