Uh... actually, you CAN have the same ID as someone else. You can have from 1 to 65535 in ANY GAME. There's a slo a hidden ID, which can be determined (complex), that serves if the two IDs are the same. But the chances of ID number, Trainer name, and hidden ID matching are a 1 in 4,294,967,296 chance... the game will recognize them as the same person anyhow.
Futher reading: http://bulbapedia.bulbagarden.net/wiki/Trainer_ID_number