My function looks like:

function TeleportGun()
{
c_trace(my.x,target_pos.x,ignore_me);

if(you) // An entity was hit?
{
vec_set(temp.x,my.x); // Store position of the player
vec_set(my.x,you.x); // Setting player to hitten entity
vec_set(you.x,temp.x); // Setting you to the stored player position
}
}




and then on right mouse click im calling the function. basically nothing happens with that code, and with the code you put there i keep getting empty pointer errors when i put the teleport code in and try it.

i made the model, but the origin is in the middle and its facing the right way.