Don't count on your friend for help.

Literal

Friend-of assistance [object-を] rely-on-[negative-imperative-な].

当てにする ('to count on, rely on') is an idiomatic construction — 当て ('aim, target, guess') + にする — literally 'make into a target/expectation.' Paired with the rough negative imperative な, it's a blunt piece of advice.