entity* theGun;
function gun_function()
{
my.passable = on;
my.ambient = 0;
vec_scale(my.scale_x,2);
while(my)
{
vec_set(my.pan,camera.pan); // Same angle as camera
vec_set(my.x,camera.x); // Same position as camera
// play around with these values
my.x += 5;
my.y += 0;
my.z += 0;
wait(1);
}
}
function createGun()
{
if(theGun != null) {ent_remove(theGun);}
theGun = ent_create("el_revolver.mdl",camera.x,gun_function);
}