I don't see a trace instruction in your code, so basically you've got to try and go with this:

First:
Tracing is done with c_trace, it checks whether there are any obstacles between two points which you specify. It gives the distance from the first point to the obstacle, or 0 if there are no obstacles. For more info look it up in the manual.

Ok, here's how to do it:
When your bullet is fired:
save the bullet's position as a vector(Ill use a vector called bullet_vec for this), this is your trace's start position

When your bullet collides:
create a bullet entity at the bullet_vec vector

give it the same pan and tilt as the bullet(don't delete bullet until you do this)

move is relatively with an x of 10000

ignoring all models, trace from bullet_vec to the new bullet position. Do this within the bullet hole function

in the same function, move the bullet hole to it's position on the wall with
Code:
 vec_set(my.x,TARGET); 



This uses the trace to move it to its destination

Give it the angle of the wall with

Code:
 vec_TO_ANGLE(my.pan,normal); 



It should now work. Don't forget to make your bullet hole passable as soon as you create it!

Hope this works! If you don't understand anything, you're much better off asking Grimber, he'll be a lot more helpful in this case.

I would have liked to give you the code, but my code is extremely messy, I have other things now in my code and my functions are all over the script!