You don't need a script to do this, it is easily accomplished in the editor. Here's what you do:
1: grab the weapon you want with the mouse
2: if you push 1-6 it rotates your selected entity different ways. On weapons press 1 and 2 to get it on its side(this doesn't work on stock weapons as they don't rotate the same ways the others)
3: once the weapons on its side simply drag it over to the table you want it on and press enter to bring it on top of the table.
This works on any entity and on bringing it to the ground too. What its doing is bringing the selected entity to the top of whatever you have it over in the editor
Hope this helped, let me know if you have any more problems!
dark peanut
Look for me on CoD4 online for PC. My username's Arbiquator (strange I know but it's the first thing that came to mind)