GetObjectPos

From SA-MP Wiki

Jump to: navigation, search


Returns the coordinates of the current position of the given object. The position is saved by reference in three x/y/z variables.


Parameters:
(objectid, &Float:X, &Float:Y, &Float:Z)
objectidThe object's id of which you want the current location.
Float:XThe variable to store the X coordinate, passed by reference.
Float:YThe variable to store the Y coordinate, passed by reference.
Float:ZThe variable to store the Z coordinate, passed by reference.


ReturnsThe objects position


new Float:x, Float:y, Float:z;
GetObjectPos(objectid, x, y, z);

Related Functions

The following functions may be useful, as they are related to this function in one way or another.


Personal tools