27.11.2011, 20:11
Its some trigonometry combined with patience when finding out the right system for sa-mp. I got this somewhere in some script, it should do the job.
pawn Код:
// arctan with x/y offset of the points
new Float:angle = atan2(x1 - x2, y1 - y2);
// angle of point 1
angle += rot1;
// correction
if(angle > 360.0) angle -= 360.0;