Musisz mieć włączone
ers_player_toggle 1
play_sound( iTeam )
{
static
// - - - - - - - - - - - - - - - -
sCurSnd[ MAX_FILE_LENGTH ];
// - - - - - - - - - - - - - - - -
new iRand;
if( g_nSnd[ iTeam ] > 1 )
iRand = random( g_nSnd[ iTeam ] );
#if defined old_amxx
copy( sCurSnd, MAX_FILE_LENGTH - 1, g_sTeam_sounds[ iRand ][ iTeam ] );
#else
ArrayGetString( iTeam == CT ? g_lstSoundCT : g_lstSoundT, iRand, sCurSnd, MAX_FILE_LENGTH - 1 );
#endif
_is_wav( sCurSnd ) ?
format( sCurSnd, MAX_FILE_LENGTH - 1, "spk %s", sCurSnd[6] ) :
format( sCurSnd, MAX_FILE_LENGTH - 1, "mp3 play %s", sCurSnd );
if( get_pcvar_num( p_player_toggle ) )
{
static
// - - - - - - - - - - -
iPlayers[32],
iNum, pid;
// - - - - - - - - - - -
get_players( iPlayers, iNum, "c" );
for( new i; i < iNum; i++ )
{
pid = iPlayers[i];
//---------------
//Tylko ten if się zmienił XD
//---------------
if( !g_pHeardSound[pid] || is_user_bot( pid ) || get_user_team(pid)!=(iTeam+1))
continue;
client_cmd( pid, "%s", sCurSnd );
}
}
else
client_cmd( 0, "%s", sCurSnd );
}


Dodatki SourceMod





Moja zawartość
Mężczyzna
Napisane przez 


rs.amxx
Napisane przez 

Napisane przez
Napisane przez
Napisane przez