I know this is jsut me talking to myself, but it may end up helping someone later on. I have it now so it teleports me to the object i shoot if its the right model.

function TeleportGun()
{
var theTarget;

vec_set(theTarget.x, vector(10000, 0, 0)); //shoots 10000 quants
vec_rotate(theTarget.x, my.pan); //shoots in the direction of the player
c_trace(my.x, theTarget.x, ignore_me + scan_texture); // Does the c_trace to the object

draw_text(tex_name,200,30,vector(100,100,255));

if(str_cmpi(tex_name, "SQUARE.MDL") == 1)
{
var tempX;
var tempY;
var tempZ;

tempX = your.x;
tempY = your.y;
tempZ = your.z;

my.x = tempX;
my.y = tempY;
my.z = tempZ;
}
}


however, theres still some aiming problems. it doesnt always aim right where it should, im not sure the camera pan thing is working like i thought it should.