Well for a rear-mirror you need two views.
One is the standard view (name: camera) and one is the newly created view_mirror.
Now for looking back you can use the view_mirror, while camera looks somewhere else (maybe the direction the player is driving? could be helpful)
So you'll only need this function:
function camera_run()
{
while(!player) { wait(1); } // wait until pointer is valid
while(player) // while player exists
{
vec_set(camera.x, player.x); // copy player position to camera position
vec_set(camera.pan, player.pan); // copy player direction to camera direction
vec_set(view_mirror.x, player.x);
vec_set(view_mirror.pan, player.pan);
view_mirror.pan += 180; // you want to look behind the player
wait(1);
}
}