// A GUN //////////////////////////////////////////////////////////////////

var shotgun_shells = 8; // amount of bullets

SOUND fire_first_gun = "SHOT8.WAV"; // must be in folder were this script is , change this if another sound ...

function muzzle_remove()
{
my.passable = on; my.transparent =on; // made it passable (shit from gun) and transparent ...
waitt(8); ent_remove (me); Remove bitmap after 8 frames
}

function shoot() // include this function in main function ... > shoot(); <
{
while(shotgun_shells > 0) // while the shotgun shells is higher then 0 ..
{
if(key_ctrl == 1)||(mouse_left == 1){shotgun_shells-=1;snd_play(fire_first_gun,100,0);vec_set(temp,camera.x);temp.x = 100000;vec_rotate( temp,camera.pan); trace_mode == ignore_me+ignore_sprites+activate_shoot; trace_mode = 1; trace(camera.x,temp);ent_create("muzzle1.tga", target,muzzle_remove); waitt(3);} // > muzzle1.tga < must be in the same folders script ...
wait(1);
}
}

//////////////////////////////////////////////////////////////////////////////

Hope it works!

/B