Code:
public move_EntToOrigin(ent,Float: origin[3]){
new Float:eOrigin[3];
new Float:eVelocity[3];
new Float:out[3];
pev(ent,pev_origin,eOrigin);
for(new i=0;i<3;i++)
out[i]=(origin[i]-eOrigin[i]) ;
xs_vec_mul_scalar(out,5.0,eVelocity);
set_pev(ent,pev_velocity,eVelocity);
}
I wrote this code but this not work and i don't know why ?
For example I would Like to move my entity(f.ex. weaponbox) to the crosshair origins (entity moving not teleport and is stopping when reach crosshair origins)