I'm not shure what exactly you want to do
For first person shooter use entity gun_ent_name ... then for muzzle use vec_for_vertex(vector,gun_ent_name,vertex_number); and for shooting do a trace from the screen coordinates (if your video mode is set to 8(1024x768) the middle is 512x and 384y (and trace forward 5000 quants(or bigger number))
For 3-rd person shooter create a normal action gun_ent_name and attach the muzzle again with vec_for_vertex , and then trace from that same vertex again 5000 quants forward (you can get that value using the weapons pan angle)
vec_for_vertex(trace1.x,weapon_entity,vertex_number);
trace2.x = trace1.x + 5000 * cos(weapon_entity.pan);
trace2.y = trace1.y + 5000 * sin(weapon_entity.pan);
trace2.z = trace1.z;
and then do the trace to see if it hits something
Hope you understand what I described.