From SA-MP Wiki
Description:
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 = -1000.0, Float:RotY = -1000.0, Float:RotZ = -1000.0)
playerid | The ID of the player whose player-object to move. |
objectid | 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.
Note
| For movement distance, One unit = 1.0 object travel distance.
|
Notes
|
- If using the rotation parameters, the object must be moved (X/Y/Z). The object will interpolate the rotation from when the objects starts moving and when it stops.
- The parameters below are for 0.3d R2 and older versions and should be ignored if you run the latest version of SA-MP.
|
Parameters:(playerid, objectid, Float:X, Float:Y, Float:Z, Float:Speed)
playerid | The player you associated this object to. |
objectid | The objectid you want to move. |
Float:X | The new X coordinate. |
Float:Y | The new Y coordinate. |
Float:Z | The new Z coordinate. |
Float:Speed | The speed at which to move the object. |
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.