This should work (put the code inside a while loop):

vec_set (camera.x, vector (-200, 0, 50)); // play with these values
vec_rotate (camera.x, player.pan);
vec_add (camera.x, player.x);
camera.pan = player.pan;