Here is my attempt :
function AI_Event()
{ if(event_type == event_impact)
{ if(you) && (my.ObjectID==3) && (you.ObjectID==3)
{ if(my.is_ph==0)
{ ent_playsound(my,ai_horn_wav,100);
phent_settype( my, PH_RIGID, PH_BOX );
phent_setmass (my, 100, ph_box);
phent_setgroup (my, 2);
phent_setfriction (my, 20);
phent_setdamping (my, 20, 30);
phent_setelasticity (my, 30, 10);
//phent_addforcelocal(my, vector(600, 0, 0), you.x);
my.is_ph=1;
}
//sleep(5);
//phent_settype( my, 0, 0 );
//my.is_ph=0;
}
}
.....
.....
function AI_Car()
{ my.is_ph=0; my.ObjectID=3;
my.enable_entity = on;
my.enable_impact = on;
my.event = AI_Event;
....
}