Table of Contents

Interface IObjectEventHandler

Namespace
SampSharp.OpenMp.Core.Api
Assembly
SampSharp.OpenMp.Core.dll

Provides the events for GetEventDispatcher().

[OpenMpEventHandler]
public interface IObjectEventHandler : IEventHandler<IObjectEventHandler>
Inherited Members

Methods

OnMoved(IObject)

Called when an object has finished moving.

void OnMoved(IObject objekt)

Parameters

objekt IObject

The object that moved.

OnObjectEdited(IPlayer, IObject, ObjectEditResponse, Vector3, Vector3)

Called when an object is edited by a player.

void OnObjectEdited(IPlayer player, IObject objekt, ObjectEditResponse response, Vector3 offset, Vector3 rotation)

Parameters

player IPlayer

The player who edited the object.

objekt IObject

The object that was edited.

response ObjectEditResponse

The response of the edit operation.

offset Vector3

The offset of the edited object.

rotation Vector3

The rotation of the edited object.

OnObjectSelected(IPlayer, IObject, int, Vector3)

Called when an object is selected by a player.

void OnObjectSelected(IPlayer player, IObject objekt, int model, Vector3 position)

Parameters

player IPlayer

The player who selected the object.

objekt IObject

The object that was selected.

model int

The model ID of the selected object.

position Vector3

The position of the selected object.

OnPlayerAttachedObjectEdited(IPlayer, int, bool, ref ObjectAttachmentSlotData)

Called when a player edits an attached object.

void OnPlayerAttachedObjectEdited(IPlayer player, int index, bool saved, ref ObjectAttachmentSlotData data)

Parameters

player IPlayer

The player who edited the attached object.

index int

The index of the attachment slot.

saved bool

A value indicating whether the changes were saved.

data ObjectAttachmentSlotData

The data of the edited attachment slot.

OnPlayerObjectEdited(IPlayer, IPlayerObject, ObjectEditResponse, Vector3, Vector3)

Called when a player object is edited by a player.

void OnPlayerObjectEdited(IPlayer player, IPlayerObject objekt, ObjectEditResponse response, Vector3 offset, Vector3 rotation)

Parameters

player IPlayer

The player who edited the object.

objekt IPlayerObject

The player object that was edited.

response ObjectEditResponse

The response of the edit operation.

offset Vector3

The offset of the edited object.

rotation Vector3

The rotation of the edited object.

OnPlayerObjectMoved(IPlayer, IPlayerObject)

Called when a player object has finished moving.

void OnPlayerObjectMoved(IPlayer player, IPlayerObject objekt)

Parameters

player IPlayer

The player associated with the object.

objekt IPlayerObject

The player object that moved.

OnPlayerObjectSelected(IPlayer, IPlayerObject, int, Vector3)

Called when a player object is selected by a player.

void OnPlayerObjectSelected(IPlayer player, IPlayerObject objekt, int model, Vector3 position)

Parameters

player IPlayer

The player who selected the object.

objekt IPlayerObject

The player object that was selected.

model int

The model ID of the selected object.

position Vector3

The position of the selected object.