German MPs have approved plans aimed at discouraging underage drinking and smoking in the country.