HL1 had this handy little function in the game rules
int CountPlayers( void )
{
int num = 0;
for ( int i = 1; i <= gpGlobals->maxClients; i++ )
{
CBaseEntity *pEnt = UTIL_PlayerByIndex( i );
if ( pEnt )
{
num = num + 1;
}
}
return num;
}
modify that for HL2.
--
**********************
Draco
Coder for Perfect Dark and Kreedz Climbing
http://perfectdark.game-mod.net
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders