What i've learnt and is correct 100% of the time is if you say "your're friendly" to someone and they take a while to respond, delay of a few seconds, then they are not friendly, which is what happened in your case, and i will shoot them.
ive died 7 times in the last day, and im still learning how these zombies work, and when to crouch run, when to prone etc and adjusting to the zombies aggro range. but 1 important thing ive learned is to not get attatched to your gear