Skip to main content

MovePlayerObject

คำอธิบาย

Move a player object with a set speed. Also supports rotation. Players/vehicles will surf moving objects.

NameDescription
playeridThe ID of the player whose player-object to move.
objectidThe ID of the object to move.
Float:XThe X coordinate to move the object to.
Float:YThe Y coordinate to move the object to.
Float:ZThe Z coordinate to move the object to.
Float:SpeedThe speed at which to move the object.
Float:RotXThe final X rotation (optional).
Float:RotYThe final Y rotation (optional).
Float:RotZThe final Z rotation (optional).
playeridThe player you associated this object to.
objectidThe objectid you want to move.
Float:XThe new X coordinate.
Float:YThe new Y coordinate.
Float:ZThe new Z coordinate.
Float:SpeedThe speed at which to move the object.

ส่งคืน

The time it will take for the object to move in milliseconds.

ตัวอย่าง

MovePlayerObject(playerid, objectid, 2001.195679, 1547.113892, 10);

บันทึก

tip

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.

ฟังก์ชั่นที่เกี่ยวข้องกัน