You need to be more careful when you're playing baseball.

Literal

Baseball [obj-を] do-[when-ときは] more be-careful-[must negative-ないと][confirm-ね].

~ないと(ね) is a colloquial abbreviated form of ~ないといけない ('must') — the ないと alone implies 'if you don't (X), (that's bad),' trailing off rather than spelling out the consequence. Very conversational. 気をつける is the set phrase for 'be careful.'