GetPlayerObjectPos

Description

Get the position of a player object (CreatePlayerObject).

NameDescription
playeridThe ID of the player whose player object to get the position of.
objectidThe object's id of which you want the current location.
&Float:XA float variable in which to store the X coordinate, passed by reference.
&Float:YA float variable in which to store the Y coordinate, passed by reference.
&Float:ZA float variable in which to store the Z coordinate, passed by reference.

Returns

1: The function executed successfully.

0: The function failed to execute. The player and/or the object don't exist.

The object's position is stored in the specified variables.

Examples

new Float:x, Float:y, Float:z;
GetPlayerObjectPos(playerid, objectid, x, y, z);

Related Functions