There are 2 types of players involved with this, the dead human who is spectating (retrieved with get_players() using "bch" flags) and the alive player being spectated (not retrieved with get_players()). So the "bch" flags have no bearing on the alive player being spectated.
Maybe this will make it make more sense:
PHP Code:
public ShowSpecInfo()
{
new iPlayers[32], iNum, iSpectator, iSpectatedPlayer, szName[33], iRank, iMaxRank, iStats[8], iBodyhits[8];
get_players(iPlayers, iNum, "bch");
iMaxRank = get_statsnum();
for( new i ; i < iNum ; i++ )
{
iSpectator = iPlayers[ i ];
iSpectatedPlayer = pev( iSpectator , pev_iuser2 );
get_user_name( iSpectatedPlayer , szName , charsmax( szName ) );
iRank = get_user_stats( iSpectatedPlayer , iStats , iBodyhits );
set_hudmessage(180, 180, 180, -1.0, 0.0, 0, 6.0, 1.1, 0.0,0.0, -1);
show_hudmessage( iSpectator , "Spectating [%s] | [Rank: %i / %i]" , szName , iRank , iMaxRank );
}
}
__________________