OnEntityMovingPositionFinished

From GT-MP
Jump to: navigation, search
OnEntityMovingPositionFinished
Shared Function
Utilities-terminal.png Server-Side System-users.png Client-Side
Csharp.png C# Javascript.png JavaScript

This type of event is used for handling code when the Position Moving action is finished.

Requirements

C#: First of all, it should be defined in your Main constructor for it to be called, otherwise it wouldn't be initiated at all!

   public Main()
   {
      API.onEntityMovingPositionFinished += MovingFinished;
   }

Usage example(s)

   private void MovingFinished(NetHandle entity)
    {
        API.consoleOutput("Entity " + entity.Value + " finished moving");
    }

JS:

API.OnEntityMovingPositionFinished .connect(function(object) {
    API.sendNotification("obj: " + object + " stopped moving");
});

References