Create a variable that will hold player's team, loop through all players and check if looped player's team isn't equal to the player who is reloading, if true use continue, else emit_sound with the variable that you looped.
Code:
new g_iMaxPlayers ;
public plugin_init( ) {
g_iMaxPlayers = get_maxplayers( ) ;
}
public Event_OnReload ( const i_Ent )
{
static id; id = pev ( i_Ent, pev_owner );
new iTeam = get_user_team( id ) ;
if ( UTIL_IsWeaponReloading ( id, i_Ent ) )
{
for( new i = 1 ; i <= g_iMaxPlayers ; i++ ) {
if( ! is_user_connected( i ) )
continue ;
if( iTeam != get_user_team( i ) )
continue ;
emit_sound ( i, CHAN_AUTO, SoundList[ random_num( 0, sizeof SoundList - 1 ) ], 1.0, ATTN_NORM, 0, PITCH_NORM );
}
}
return PLUGIN_CONTINUE ;
}
__________________