create a global variabel to contain the camera state
Code:
var camera_state = 1;
...
function select_cameras()
{	
	while(1)
	{
		if(key_7) camera_state = 1;
		if(key_8) camera_state = 2;
		if(key_9) camera_state = 3;
                switch(camera_state) 
                {
                      case 1: camera_1stperson();break
                      case 2: camera_3rdperson();break
                      case 3: camera_3rdperson2();break
                }
		wait(1);
	}
}
...