Awhile back I was messing around with particles and had the same issue. I found that if you put some code in the p.event function (Base_Effect_base_event) to put lifespan to 0. it fixed the problem.

EXMAPLE:
function Base_Effect_base_event(PARTICLE* p) {
p.vel_x = sinv(p.skill_d*3.6+180)*p.skill_x;
p.vel_y = cosv(p.skill_d*3.6)*p.skill_y;
p.vel_z = p.skill_z;
if(p.creator)vec_rotate(p.vel_x,p.creator.pan);
p.skill_d +=1*time_step;
if(p.skill_d>=1)p.lifespan=0;
}

I simply used skill_d because the one in your function seemed pointless.
Hope this helps.