You should be able to base it on the 2D particle system code, except that you'll need to add a Z-velocity to go along with the X-velocity and Y-velocity.
check some 3d models in the model library. I think there are some particle system there