@@ -599,20 +599,7 @@ native bool:GetVehicleZAngle(vehicleid, &Float:angle);
599599 * <param name="y">A float variable in which to store the third quaternion angle, passed by reference</param>
600600 * <param name="z">A float variable in which to store the fourth quaternion angle, passed by reference</param>
601601 * <seealso name="GetVehicleZAngle" />
602- * <remarks>
603- * <b>To euler:</b><br />
604- * <code>
605- * // GetVehicleRotation Created by IllidanS4<br />
606- * stock GetVehicleRotation(vehicleid, &Float:rx, &Float:ry, &Float:rz)<br />
607- * {<br />
608- * new Float:qw, Float:qx, Float:qy, Float:qz;<br />
609- * GetVehicleRotationQuat(vehicleid, qw, qx, qy, qz);<br />
610- * rx = asin((2 * qy * qz) - (2 * qx * qw));<br />
611- * ry = -atan2((qx * qz) + (qy * qw), 0.5 - (qx * qx) - (qy * qy));<br />
612- * rz = -atan2((qx * qy) + (qz * qw), 0.5 - (qx * qx) - (qz * qz));<br />
613- * }
614- * </code>
615- * </remarks>
602+ * <seealso name="GetVehicleRotation" />
616603 * <remarks>There is no 'set' variation of this function; you can not SET a vehicle's rotation (apart
617604 * from the <a href="#SetVehicleZAngle">z angle</a>) </remarks>
618605 * <remarks>This function may return incorrect values for unoccupied vehicles. The reason is that the
@@ -625,6 +612,28 @@ native bool:GetVehicleZAngle(vehicleid, &Float:angle);
625612 */
626613native bool: GetVehicleRotationQuat (vehicleid, & Float: w, & Float: x, & Float: y, & Float: z);
627614
615+ /* *
616+ * <library>omp_vehicle</library>
617+ * <summary>Returns a vehicle's rotation as euler.</summary>
618+ * <param name="vehicleid">The ID of the vehicle to get the rotation of</param>
619+ * <param name="x">A float variable in which to store the X axis angle, passed by reference</param>
620+ * <param name="y">A float variable in which to store the Y axis angle, passed by reference</param>
621+ * <param name="z">A float variable in which to store the Z axis angle, passed by reference</param>
622+ * <seealso name="GetVehicleZAngle" />
623+ * <seealso name="GetVehicleRotationQuat" />
624+ * <seealso name="GetVehicleMatrix" />
625+ * <remarks>There is no 'set' variation of this function; you can not SET a vehicle's rotation (apart
626+ * from the <a href="#SetVehicleZAngle">z angle</a>) </remarks>
627+ * <remarks>This function may return incorrect values for unoccupied vehicles. The reason is that the
628+ * third row of the vehicle's internal rotation matrix gets corrupted if it gets updated while unoccupied.
629+ * </remarks>
630+ * <returns>
631+ * <b><c>1</c></b>: The function executed successfully.<br />
632+ * <b><c>0</c></b>: The function failed to execute. This means the vehicle specified does not exist.
633+ * </returns>
634+ */
635+ native bool: GetVehicleRotation (vehicleid, & Float: x, & Float: y, & Float: z);
636+
628637/* *
629638 * <library>omp_vehicle</library>
630639 * <summary>This function can be used to calculate the distance (as a float) between a vehicle and another
0 commit comments