local CombineTeams = epsilonScript.Config:Get( "CombineTeams" );
local OnTable = { "npc/overwatch/radiovoice/on1.wav", "npc/overwatch/radiovoice/on3.wav" }
local OffTable = { "npc/overwatch/radiovoice/off2.wav", "npc/overwatch/radiovoice/off4.wav" }

concommand.Add( "eps_chatopen", function( ply, cmd, args )
	if ( !ply:Alive() ) then return; end;
	
	ply:SetNWBool( "ChatOpen", true );
	
	for k, v in pairs( CombineTeams ) do
		if ( ply:Team() == v ) then
			ply:EmitSound( OnTable[ math.random( 1, #OnTable ) ] );
		end;
	end;
end );

concommand.Add( "eps_chatclosed", function( ply, cmd, args )
	if ( !ply:Alive() ) then return; end;
	
	ply:SetNWBool( "ChatOpen", false );
	
	for k, v in pairs( CombineTeams ) do
		if ( ply:Team() == v ) then
			ply:EmitSound( OffTable[ math.random( 1, #OffTable ) ] );
		end;
	end;
end );