Passa al contenuto principale

GetPlayerRotationQuat

warning

This function was added in omp v1.1.0.2612 and will not work in earlier versions!

Description

Returns a player's rotation on all axes as a quaternion.

NameDescription
playeridThe ID of the player to get the rotation of.
&Float:wA float variable in which to store the first quaternion angle, passed by reference.
&Float:xA float variable in which to store the second quaternion angle, passed by reference.
&Float:yA float variable in which to store the third quaternion angle, passed by reference.
&Float:zA float variable in which to store the fourth quaternion angle, passed by reference.

Returns

true - The function was executed successfully.

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

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

Examples

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

GetPlayerRotationQuat(playerid, w, x, y, z);

Notes

suggerimento

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