MovePlayerObject
Description:
Function MovePlayerObject move a player object with a set speed. Also supports rotation. Players/vehicles will surf moving objects.
|
|
Parameters:
(playerid, objectid, Float:X, Float:Y, Float:Z, Float:Speed, Float:RotX, Float:RotY, Float:RotZ)
int | playerid | The ID of the player whose player-object to move. |
int | modelid | The ID of the object to move. |
float | X | The X coordinate to move the object to. |
float | Y | The Y coordinate to move the object to. |
float | Z | The Z coordinate to move the object to. |
float | Speed | The speed at which to move the object. |
float | RotX | The final X rotation (optional). |
float | RotY | The final Y rotation (optional). |
float | RotZ | The final Z rotation (optional). |
Return Values:
The time it will take for the object to move in milliseconds.
Examples:
MovePlayerObject(playerid, objectid, 2001.195679, 1547.113892, 10);
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- CreatePlayerObject: Create an object for only one player.
- DestroyPlayerObject: Destroy a player object.
- IsValidPlayerObject: Checks if a certain player object is vaild.
- StopPlayerObject: Stop a player object from moving.
- IsObjectMoving: Check if the object is moving.
- SetPlayerObjectPos: Set the position of a player object.
- SetPlayerObjectRot: Set the rotation of a player object.
- GetPlayerObjectPos: Locate a player object.
- GetPlayerObjectRot: Check the rotation of a player object.
- AttachPlayerObjectToPlayer: Attach a player object to a player.