its a bit complicated, i'll explain the theory:
you need to constantly check how far you(the player) is from the tank.
when you are quite close, you allow the player to press a button.
if they press the button, you change a variable flag
meanwhile you have an if function that detects if the variable flag changes. if it does, position the camera in a different place and allow the player to control the tank. if the variable flag doesn't change, then the player hasn't pressed the button to get into the tank, and they should be allowed to keep walking normally.
thats pretty much it, i've done in a game already, but the code is quite alot more complicated than that, if your still stuck i might be able to do some basic code for you.
In the beginning, the universe was created...
This made alot of people very angry and it has been widely regarded as a bad idea...
Visit
http://redeye.dbspot.com