I am trying to get the angle of a line between 2 origins. I have searched and tried quite a few ways but nothing is working for me. I was able to get the angle of my aim using pev_v_angle but that will only return the angle I am currently aiming; I need it to compute the angle based on 2 inputted origins. Is there a way to do this?
Example, I would need the angle of the line shown below (would prob be ~45 degree or so)
Among a few other ways, I've tried using fm_get_view_angle_diff() and the below code with no luck.
PHP Code:
new Float:fOrigin1[3];
new Float:fOrigin2[3];
pev(id,pev_origin, fOrigin1);
fm_get_aim_origin(id, fOrigin2 );
fAngle = xs_vec_angle( fOrigin1, fOrigin2);
client_print(0,print_chat,"Angle: %f" , fAngle );
+karma for anyone who can help
__________________