he doesnt have the right to tell u what to do, especially when he's doing the very things he's telling u not to!!
that is plain selfish.
now when it comes to "bad" habit(s) i think he should start by being a role model here; if he's doing it then y telling u not to do it?!
there should be a compromise in any relation, but not at your expense!
good luck