Thanks, but since I posted that I got it working. Below is the code:

function TeleportGun()
{
var theTarget;

vec_set(theTarget.x, vector(10000, 0, 0)); //shoots 10000 quants
vec_rotate(theTarget.x, camera.pan); //shoots in the direction of the player
c_trace(my.x, theTarget.x, ignore_me + scan_texture | ignore_passable | use_aabb ); // aabb works great here

if(str_cmpi(tex_name, "SQUARE.MDL") == 1) // if the entity hit is square.mdl
{
var tempX; //
var tempY; // Gonna use these later!
var tempZ; //

tempX = your.x; //
tempY = your.y; // Store old entity variables
tempZ = your.z; //

ent_create("square.mdl", my.x, null); // Create entity at player old position

my.x = tempX; //
my.y = tempY; // Move player to old entity position
my.z = tempZ; //

if (your) // if the entity hit still exists
{
ent_remove(your); // poof
}

}
}