I don't know whether this is reasonable within the whole of your game, but it should do the task, although not tested.

function create_px()
{
while (1)
{
add here:if(key_m)
add here:{
vec_set(temp,vector(20,0,0));
vec_rotate(temp,(plBiped01_entity.pan);
vec_add(temp,(plBiped01_entity.x);
effect(effect_x, 1, temp, nullvector);
add here:}
wait (1);
}
}
remove this line:on_m = create_px;

-----------
BTW: How can I format this as code?