OnObjectMoved

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 17:28, 27 April 2014
MP2 (Talk | contribs)

← Previous diff
Current revision
OstGot (Talk | contribs)

Line 6: Line 6:
{{Param|objectid|The ID of the object that was moved}} {{Param|objectid|The ID of the object that was moved}}
-{{NoReturnCallback}}+{{Returns|This callback does not handle returns.
 +* It is always called first in filterscripts.}}
{{Note|[[SetObjectPos]] does not work when used in this callback. To fix it, recreate the object.}} {{Note|[[SetObjectPos]] does not work when used in this callback. To fix it, recreate the object.}}

Current revision



Description:

This callback is called when an object is moved after MoveObject (when it stops moving).


Parameters:
(objectid)
objectidThe ID of the object that was moved


Return Values:

This callback does not handle returns.
  • It is always called first in filterscripts.


Image:32px-Ambox_warning_orange.png

Note

SetObjectPos does not work when used in this callback. To fix it, recreate the object.


Example Usage:

public OnObjectMoved(objectid)
{
    printf("Object %d finished moving.",objectid);
    return 1;
}

Related Functions

The following functions might be useful, as they're related to this callback in one way or another.


Related Callbacks

The following callbacks might be useful as well, as they are related to this callback in one way or another.

Personal tools
In other languages