SetObjectPos

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 16:49, 26 April 2014
MP2 (Talk | contribs)
(Return values)
← Previous diff
Revision as of 17:02, 10 May 2015
MP2 (Talk | contribs)

Next diff →
Line 1: Line 1:
{{Scripting}} {{Scripting}}
-{{Description|Change the position of an object.}}+{{Description|Change the position of an [[CreateObject|object]].}}
{{parameters|objectid, Float:X, Float:Y, Float:Z}} {{parameters|objectid, Float:X, Float:Y, Float:Z}}
-{{param|objectid|The ID of the object to set the position of.}}+{{param|objectid|The ID of the object to set the position of. Returned by [[CreateObject]].}}
{{Param|Float:X|The X coordinate to position the object at.}} {{Param|Float:X|The X coordinate to position the object at.}}
{{Param|Float:Y|The Y coordinate to position the object at.}} {{Param|Float:Y|The Y coordinate to position the object at.}}

Revision as of 17:02, 10 May 2015



Description:

Change the position of an object.


Parameters:
(objectid, Float:X, Float:Y, Float:Z)
objectidThe ID of the object to set the position of. Returned by CreateObject.
Float:XThe X coordinate to position the object at.
Float:YThe Y coordinate to position the object at.
Float:ZThe Z coordinate to position the object at.


Return Values:

This function always returns 1, even if the object specified does not exist.


Example Usage:

SetObjectPos(objectid, 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.