Do you have another code that works? I am trying to use that Thirdp code but it always just crashes my thing when I try to run. It works fine, but, it doesn't stay behind the model, it just sits at the same angle and turns. This is what I have.

Code:
//////////////////////////////
#include <acknex.h>
#include <default.c>

///////////////////////////////
//ENTITY* car;

var walk_percentage;


action my_car()
{
	while (1)
	{	
		
		if (key_cul)
		{
			my.pan += 3*time_step; // increase the pan angle of the car
		   camera.pan += 3*time_step;

			
		}
                         // does same thing as above but is faster
	
		if (key_cur)
		{
			my.pan -= 3*time_step; 
			  camera.pan -= 3*time_step;
	// decrease the pan angle of the car
		}
		if (key_cuu) // press and hold the "Space" key to move the car
		{
			c_move (my, vector(15*time_step, 0, 0), nullvector, GLIDE);
		
	}
	   if (key_cud)
	   {
	c_move (my, vector(-15*time_step, 0, 0), nullvector, GLIDE);
      }
      if (key_d)
      {
      	c_move (my, vector(0, 0, -5), nullvector, GLIDE);
}
camera.x = my.x-100;
camera.y = my.y;
camera.z = my.z+50;
camera.tilt = -20;

wait(1);

        
	}
}




function main()
{
	level_load ("homework18.wmb");
	wait (2);
	//car = ent_create("car1.mdl", vector(0,0,10), NULL);
        ent_create("guard.mdl", vector(400,0,100), my_car);

	//camera.x = car.x;
	//camera.y = car.y;
	//camera.z =  car.z +17;
	//camera.tilt = -5;
	wait(1);

}