Driving game help

I am making a driving game and i need help, switching the camera, how can you make it use a key

var MainCamera : GameObject = GMC;
var OverheadCam : GameObject = GMC; 
var GMC : GameObject ;


function OnGUI () {
	// Make a background box
	GUI.Box (Rect (10,10,100,90), "Camera");

	// Make the first button. If it is pressed, Application.Loadlevel (1) will be executed
	if (GUI.Button (Rect (20,40,80,20), "Hood")) {
		MainCamera.camera.active = false;
       OverheadCam.active = true;
	}

	// Make the second button.
	if (GUI.Button (Rect (20,70,80,20), "Main Camera")) {
		MainCamera.camera.active = true;
OverheadCam.active = false;

	}
}

thats what i have now, instead of a button, how do i use a Key like C?

i just used the weapon switch prefab from the unity tutorial series

function Start () {
	// Select the first weapon
	SelectWeapon(0);
}

function Update () {
	// Did the user press fire?
	if (Input.GetButton ("Fire1"))
		BroadcastMessage("Fire");
		
	if (Input.GetKeyDown("1")) {
		SelectWeapon(0);
	}	
	else if (Input.GetKeyDown("2")) {
		SelectWeapon(1);
	}	
}

function SelectWeapon (index : int) {
	for (var i=0;i<transform.childCount;i++)	{
		// Activate the selected weapon
		if (i == index)
			transform.GetChild(i).gameObject.SetActiveRecursively(true);
		// Deactivate all other weapons
		else
			transform.GetChild(i).gameObject.SetActiveRecursively(false);
	}
}

then you just drag the first cam in that is your first vieuw (press 1)

and you drag second cam in ; thirdperson vieuw (pres2)

here is a picture of howe it has to look like

but do notice that you need to copy your car as well


i am not a scipter i am just a newb that uses pre made scripts and modify them a bit

actualy i don’t understand shit of scipting


and feel free to pass by this forum cuz you might help me
http://forum.unity3d.com/viewtopic.php?t=58931

i need more help on this, i dont want 2 keys, i want one to switch 3 cameras, AND i need help makeing switch meshes (switching)

Store the cameras in an array and then use code like the following to switch between them:-

var cameras: Camera[];
var currCamIndex: int;

function Update() {
   if (Input.GetKeyDown("c")) {
      cameras[currCamIndex].enabled = false;
      currCamIndex = (currCamIndex + 1) % cameras.Length;
      cameras[currCamIndex].enabled = true;
   }
}

can you tell me how to put them in an aray?

The array declaration is this line:-

var cameras: Camera[];

This variable will be visible in the inspector and you can set its values from there. With an array, you need to set the size property first (to the number of cameras you want) and then drag the individual camera objects to their slots.