Chuyển tới nội dung chính

GetVehicleRotation

cảnh báo

Đã thêm hàm trong phiên bản omp v1.5.8.3079. Mục này không hoạt động trên các phiên bản cũ hơn!

Description​

Returns a vehicle's rotation as euler.

NameDescription
vehicleidThe ID of the vehicle to get the rotation of.
&Float:xA float variable in which to store the X axis angle, passed by reference.
&Float:yA float variable in which to store the Y axis angle, passed by reference.
&Float:zA float variable in which to store the Z asix angle, passed by reference.

Returns​

true - The function was executed successfully.

false - The function failed to execute. This means the vehicle specified does not exist.

The vehicle's rotation is stored in the specified variables.

Examples​

new
Float:x,
Float:y,
Float:z;

GetVehicleRotation(vehicleid, x, y, z);

Notes​

ghi chú

There is no 'set' variation of this function; you can not SET a vehicle's rotation (apart from the Z angle)

cảnh báo

This function may return incorrect values for unoccupied vehicles. The reason is that the third row of the vehicle's internal rotation matrix gets corrupted if it gets updated while unoccupied.