FPS Game and switching roles

I am making a FPS game, and I need to know how to make my player become a tank, airplane... when he gets close to the tank or plane.

What I mean is when my player is a certain distance away form a vehicle, I press a input button, and all my players controlls and cameras deactivate while my all my vehicles cameras and controlls activates. So instead of controling my player I am controlling my vehicle. Also when i press another input button my guy gets out and his controls and cameras are activated and the vehicles are deactivated. Also the player needs to be attacted to the vehicle so when I press the input button to get out he is where the vehicle is and not where they started off.

Its just like real life I get in the car, drive and get out.



The next time, look at the Wiki and the documentation. All your questions show you haven't searched for information there.