Arduino - Ir Communications over long rang?

josephchrzempiec:
Riva So that is why In some of the examples i see people using a Transistor like a 2n2222. I guess it is to make it work?

Yes. The Arduino I/O pin can only deliver a max of 40mA but better to stay below 20mA else the pin will be damaged over time.
Depending on what IR LED your using it may be able to handle about 100mA continuous current so a lot more power/range that the Arduino pin can deliver.
Another thing to note is IR covers a range of frequencies and it's best to ensure the IR sender/receivers are using the same frequency else this will reduce range or stop them working together.