A player who is creating a rogue/monk will not accept that a rogue cannot sneak attack by using flanking. I have pointed out the wording, that I see as important on this...
It would be really good to have this resolved on the FAQ of the Core Rulebook, I looked but didn't see it.
Sneak Attack: If a rogue can catch an opponent when he is unable to defend himself effectively from her attack, she can strike a vital spot for extra damage.
The rogue's attack deals extra damage anytime her target would be denied a Dexterity bonus to AC (whether the target actually has a Dexterity bonus or not), or when the rogue flanks her target. This extra damage is 1d6 at 1st level, and increases by 1d6 every two rogue levels thereafter. Should the rogue score a critical hit with a sneak attack, this extra damage is not multiplied. Ranged attacks can count as sneak attacks only if the target is within 30 feet.
With a weapon that deals nonlethal damage (like a sap, whip, or an unarmed strike), a rogue can make a sneak attack that deals nonlethal damage instead of lethal damage. She cannot use a weapon that deals lethal damage to deal nonlethal damage in a sneak attack, not even with the usual –4 penalty.
The rogue must be able to see the target well enough to pick out a vital spot and must be able to reach such a spot. A rogue cannot sneak attack while striking a creature with concealment.
When making a melee attack, you get a +2 flanking bonus if your opponent is threatened by another enemy character or creature on its opposite border or opposite corner.
When in doubt about whether two characters flank an opponent in the middle, trace an imaginary line between the two attackers' centers. If the line passes through opposite borders of the opponent's space (including corners of those borders), then the opponent is flanked.
Exception: If a flanker takes up more than 1 square, it gets the flanking bonus if any square it occupies counts for flanking.
Only a creature or character that threatens the defender can help an attacker get a flanking bonus.
Creatures with a reach of 0 feet can't flank an opponent.
Probably 80%+ interpret that the phrase When making a melee attack, you get +2 flanking bonus means that you must be in melee to be flanking the opponent and therefore a thief within 30ft cannot do sneak attack damage through flanking.
Flanking doesn't seem to explicitly exclude ranged flanking attacks, it states you don't get the flanking attack bonus, so sneak attack damage is taken by the target. OK, it is firing into melee and the melee fighter does not get the flanking bonus either, but it is open to this interpretation.
My player's interpretation.
The rogue's special abilities to do ranged sneak attacks, implies that any ranged sneak attack within 30ft where the opponent is in a line of flanking or denied dex, supercedes the combat rules, to make the rogue special and different from fighters etc.
So what did the game writers mean when they wrote the rules, which is the interpretation we should all have been using?
I play in games that interpret the rules as per the first option and I'm fine with that, but would really like a definitive interpretation, preferably put in the FAQs. It would save me and the player going at it hammer and tongs and getting a certain amount of resentment for doing it this way. The player is a DM for over 30yrs, from D&D V1.0 through to V3.5, so is quite resolute about his interpretations.
The rogue needs to be flanking.
or when the rogue flanks her target.
When she is at range, she is not flanking her target. Flanking is only melee.
Flanking requires "another enemy character" threatening with you, which without some feats, rogues at range can't do. They don't threaten with a bow.
Does this FAQ help?
Gang Up: Does this feat (page 161) allow you to flank a foe with ranged weapons?
The Gang Up feat allows you to count as flanking so long as two of your allies are threatening your opponent. The feat makes no mention of ranged attacks being included, and since flanking specifically refers to melee attacks, ranged attacks do not benefit from this feat. (JMB, 8/13/10)
—Jason Bulmahn, 08/13/10
I know that it is asking about gang up, but might help to show the intent of flanking.