Php Code:
#include <default.c>
#include <acknex.h>
#include <ackphysx.h>

function mass ()
{
	pXent_setmass(my,60);
	pXent_setfriction (my, 100);
	pXent_setdamping (my, 20, 20);
	pXent_setelasticity (my,20);
   //pXent_addforcecentral (my,vector(0,0,2000));
}


function simple_car()
{
	ENTITY* car = ent_create("bmw.mdl",vector(300,-1000,5),NULL); 
	pXent_settype(car,PH_RIGID,PH_BOX);
	pXent_setmass(car,30);
	ENTITY* BLwheel = ent_create("bmwwheel.mdl",vector(car.x-50,car.y-24,car.z-12),mass);
	ENTITY* BRwheel = ent_create("bmwwheel.mdl",vector(car.x-50,car.y+24,car.z-12),mass);
	ENTITY* FLwheel = ent_create("bmwwheel.mdl",vector(car.x+56,car.y-24,car.z-12),mass);
	ENTITY* FRwheel = ent_create("bmwwheel.mdl",vector(car.x+56,car.y+24,car.z-12),mass);
	pXcon_add ( PH_WHEEL, FLwheel, car, 0 );
	pXcon_add ( PH_WHEEL, FRwheel, car, 0 );
	pXcon_add ( PH_WHEEL, BLwheel, car, 0 );
	pXcon_add ( PH_WHEEL, BRwheel, car, 0 );
	//drive the car		
	while(1)
	{
		speed=clamp(speed,-2000,2000);
		lenk=clamp(lenk,-20,20);
		
		if(key_w)
		{
			speed-=100;
		}
		else
		if(key_w==0)
		speed+=10;
		
		if(key_s)
		{
			speed+=100;
		}
		
		if(key_a)
		{
			lenk-=2;
		}
		
		if(key_d)
		{
			lenk+=2;
		}
		
		DEBUG_VAR(lenk,200);
		pXcon_setwheel (FLwheel,lenk,0,0);
		pXcon_setwheel (FRwheel,lenk,0,0); // steer to the right
		pXcon_setwheel (BLwheel,0,speed,0);
		pXcon_setwheel (BRwheel,0,speed,0);
		
 
		
		
		//	var max_speed = 3000;
		//	 var speed_contr =5*(key_w - key_s);//w = 1, s = -1, w & s = 0
		//		
		//		var ang_force = speed_contr * 1000 * time_step;
		//		
		//		pXcon_setmotor (car, vector(-ang_force, max_speed, 0), nullvector);
		//		pXcon_setmotor (car,vector(-ang_force, max_speed, 0), nullvector);
		
		   pXent_addvelcentral(car,vector(0,0,-10));
//			pXent_addvelcentral(FLwheel,vector(0,0,-50));
//			pXent_addvelcentral(FRwheel,vector(0,0,-50));
//			pXent_addvelcentral(BLwheel,vector(0,0,-50));
//			pXent_addvelcentral(BRwheel,vector(0,0,-50));

		camera.x = car.x - 250 *cos(car.pan);
		camera.y = car.y - 250 *sin(car.pan);
		camera.z = car.z + 50;
		camera.pan = car.pan;
		
		
		wait(1);
	}
}

void main()
{
	fps_max=60;
	
	video_mode=12;
	//ph_fps_max_lock=120;
	physX_open();
	level_load ("testlevel.wmb");
	simple_car();
	wait(5);
} 




It is buggy but it still does a little bit of what a car should do grin


asking is the best Way to get help laugh laugh laugh