so you mus spawn the bullet a litter front the gun with vec_vor vertex.
so open you gun model in MED look witch vertex are at the front of the gun
example = put this in the action for the gun :
vec_for_vertex(temp,my,xx) xx is the vertex from the gun
temp.x +=5;
ent_create("bullet.mdl",temp,bullet);
and set the FLAG2 tag to the gun and the player