SetPlayerObjectPos

From SA-MP Wiki

Jump to: navigation, search


Description:

Sets the position of a player-object to the specified coordinates.


Parameters:
(playerid, objectid, Float:X, Float:Y, Float:Z)
playeridThe ID of the player whose player-object to set the position of.
objectidThe ID of the player-object to set the position of. Returned by CreatePlayerObject.
Float:XThe X coordinate to put the object at.
Float:YThe Y coordinate to put the object at.
Float:ZThe Z coordinate to put the object at.


Return Values:

  • 1: The function executed successfully.
  • 0: The function failed to execute. Player and/or object do not exist.


Example Usage:

new obj = CreatePlayerObject(...);
 
// Later on
 
SetPlayerObjectPos(playerid, obj, 2001.195679, 1547.113892, 14.283400);

Related Functions

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


Personal tools
Navigation
Toolbox
In other languages