Code:
//add the vars to the very beginning of your main script:

var cam_distance = 100;
var cam_height = 20;
var cam_mode;
define mode_3rd,0;
define mode_first,1;

//add this function somewhere down the bottom (just before or after the main
//method, for example:

function switch_cam_modes()
{
if(cam_mode == mode_3rd)
{
cam_mode = mode_first;
}
else
{
cam_mode = mode_3rd;
}
}

on_c = switch_cam_mode;

//then replace the code you posted with the following:
}
if(cam_mode == mode_first)
{
// camera updates 1st person view
vec_set (Camera.x,player.x);
camera.z += 27;
camera.pan = player.pan;
camera.tilt += (key_pgup - key_pgdn)*4*time;
}
else
{
//place cam behind player:
vec_set(temp,vector(-cam_distance,cam_heigth,0));
vec_rotate(temp,camera.pan);
vec_add(temp,player.x);
vec_set(camera.x,temp);
//make camera face player:
vec_diff(temp,player.x,camera.x);
vec_to_angle(camera.pan,temp);
}
wait(1);
}


that's all... just tell me if it works or not, or if you need help with where to place the code...
done...


~"I never let school interfere with my education"~
-Mark Twain