the particle effect for the smoke is the same as the one in the
PARTICLE.C script which comes with GS. the one described just
effect(particle_smoke,8,hit.x,NULLVECTOR), inside the ray trace definition for the gun(a seperate function which traces a ray with enable_shoot, scan_texture, etc.), if the trace hits
a NULL object(if(you==NULL)) it goes to that effect. however, as I said. it does this with any type of effect, even particle generators. so it's not just where the effect() command was triggered.