04.08.2014, 15:26
Thats trigonometry. Im not sure about the exact angles as SA-MP angles always behave strange.
Thats a pretty common question, you could have searched
pawn Код:
//new Float:x, Float:y, Float:z, Float:rot; // is Vehicle 1 position and rotation
new Float:cx, Float:cy, Float:cz; // is Vehicle 2 position
cx = x + floatsin(360.0 - (rot + 180.0), degrees) * distance_between_vehicles; // "360.0 -" is to transform the samp angle to the mathematical one
cy = y + floatcos(360.0 - (rot + 180.0), degrees) * distance_between_vehicles; // "+ 180.0" is to point behind the other vehicle, else it would spawn in front of it
![Tongue](images/smilies/razz.gif)