Like this;

Click to reveal..
function mouse_aim()
{
proc_mode=PROC_LATE;
VECTOR weaponOffset;
while(1)
{
if(mouse_right == 1)// hold it to aim.
{
camera.arc = 50; // zoom alittlebit
//set position
////////////////////////////////
vec_set (weaponOffset.x, vector (?, ?, ?));
vec_rotate (weaponOffset.x, vector (camera.pan, camera.tilt, 0));
vec_add (weaponOffset.x, camera.x);
vec_set (my.x, weaponOffset.x);
my.pan = camera.pan;
my.tilt = camera.tilt;
wait(1);
//end of setting the position
////////////////////////////////
}
else //When your not pressing mouse right.
{
camera.arc = 80;
vec_set(my.x,weaponOffset);
vec_rotate(my.x,camera.pan);
vec_add(my.x,camera.x);
vec_set(my.pan,camera.pan);
my.pan = camera.pan;
my.tilt = camera.tilt;
wait(1);
}
}
}


It`s tested and it works.
You just must play with the numbers to set the right position.