You'd have to get the forward vector. Here's an example:
Code:
/* Assume id is passed to this function */
new Float:Origin[3],Float:Angle[3],Float:Forward[3],Float:Result[3]
pev(id,pev_origin,Origin)
pev(id,pev_v_angle,Angle)
engfunc(EngFunc_MakeVectors,Angle)
global_get(glb_v_forward,Forward)
Result[0] = Origin[0] + Forward[0] * 100
Result[1] = Origin[1] + Forward[1] * 100
/* This will leave it on the same z axis,
but if you want it to go up and down,
uncomment the line after and comment
this one */
Result[2] = Origin[2]
//Result[2] = Origin[2] + Forward[2] * 100
engfunc(EngFunc_SetOrigin,Index,Result)
You can also make it go to the right, up, etc, using glb_v_right and glb_v_up.
__________________