PHP Code:
start = self geteye();
fw = anglestoforward(self getplayerangles());
end = start + maps\mp\_utility::vectorscale( fw, 1000 ); //increase the distance if you need to
tr = bullettrace(start, end, true, self);
if(isdefined(tr["entity"]) && isplayer(tr["entity"])) {
//do things with the player e.g set origin
player = tr["entity"];
//do the following in a loop and update the fw
new_pos = maps\mp\_utility::vectorscale(fw, distance(start, player.origin));
player setorigin(new_pos);
}
Here's the basics, should get you on track.