Przejdź do głównej zawartości

SetPlayerObjectRot

Description

Set the rotation of an object on the X, Y and Z axis.

NameDescription
playeridThe ID of the player whose player-object to rotate.
objectidThe ID of the player-object to rotate.
Float:rotationXThe X rotation to set.
Float:rotationYThe Y rotation to set.
Float:rotationZThe Z rotation to set.

Returns

true - The function executed successfully.

false - The function failed to execute.

Examples

new gPlayerObject[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
gPlayerObject[playerid] = CreatePlayerObject(playerid, 2587, 2001.195679, 1547.113892, 14.283400, 0.0, 0.0, 96.0);

SetPlayerObjectRot(playerid, gPlayerObject[playerid], 0.0, 0.0, 180.0);
return 1;
}

Notes

wskazówka

To smoothly rotate an object, see MovePlayerObject.