Surgoshan said:
"When you make a ranged attack against an enemy and other enemies are in the way, your target has cover". Bolding mine. Your allies only count as cover for a ranged attack.
I read the definition as allies to not provide cover to an enemy target, but do provide cover for you against an enemy target.
So if the "you" in in your statement is not a PC but an NPC baddie, then the a PCs allies would be the "other enemies". That sounds as though allies of a PC target that are in the way of a ranged attack being made by an NPC baddie would provide that PC target to have cover.
Example: R=ranger PC, C=Cleric PC, K kobold enemy, L=lizardman archer
R::C:::::K:::L
If R attacks K, K does not get cover from C since C is an ally of R
If R attack L, L does not get cover from C , but does get cover from K since K is an enemy of R's
And the reverse would be true:
If L attacks C, C does not get cover from K Since K is an ally of L
If L attack R, R does not get cover from K , but does get cover from C since C is an enemy of L's.