「おまえ、そんな体験したこともねぇのにわかったようなこと言うなっ」
How can I know?
When it's spoken, you could easily tell the difference by the pitch accent:
わかったようなこと[言うな]{LHL} ← negative imperative
わかったようなこと[言うな]{LHH} ← mild emphasis, emotion
But in writing it could be ambiguous. So I'd write it as 「言うなっ!」or 「言うなよ」 etc. to clearly show that it's negative imperative. To clearly show that it's the emphatic/emotional な, I would probably write it as 「言うなぁ」「言うな・・・」「言うな?」「言うよな」 etc., add 「よくもそんな」「よくそんな」, and/or maybe change the verb into the potential form, as in:
おまえ、そんな体験したこともねぇのによくもそんなわかったようなこと言うな?
おまえ、そんな体験したこともねぇのによくそんなわかったようなこと(が)言えるな。
But my English translation "even though X don't Y" isn't good English grammar, so I'm not sure if this is allowed in Japanese.
The のに (even though) is being used here because したこともねぇのに modifies 言う, not 言うな. In other words, the scope of negation is the whole 「そんな~~~言う」, not just 「わかったようなことを言う」:
[(そんな体験したこともねぇのに)わかったようなこと言う]+な
"don't do" + "talk like you know it all even though you've never had such an experience"
→ "Don't talk like you know it all" + "when you've never had such an experience."