Table of Contents

Interface IPlayerShotEventHandler

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

Provides the events for GetPlayerShotDispatcher().

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

Methods

OnPlayerShotMissed(IPlayer, ref PlayerBulletData)

Called when a player fires a shot that does not hit any target.

bool OnPlayerShotMissed(IPlayer player, ref PlayerBulletData bulletData)

Parameters

player IPlayer

The player who fired the shot.

bulletData PlayerBulletData

The data of the bullet fired.

Returns

bool

true if the event should be processed; otherwise, false to ignore it.

OnPlayerShotObject(IPlayer, IObject, ref PlayerBulletData)

Called when a player fires a shot that hits an object.

bool OnPlayerShotObject(IPlayer player, IObject target, ref PlayerBulletData bulletData)

Parameters

player IPlayer

The player who fired the shot.

target IObject

The object that was hit by the shot.

bulletData PlayerBulletData

The data of the bullet fired.

Returns

bool

true if the event should be processed; otherwise, false to ignore it.

OnPlayerShotPlayer(IPlayer, IPlayer, ref PlayerBulletData)

Called when a player fires a shot that hits another player.

bool OnPlayerShotPlayer(IPlayer player, IPlayer target, ref PlayerBulletData bulletData)

Parameters

player IPlayer

The player who fired the shot.

target IPlayer

The player who was hit by the shot.

bulletData PlayerBulletData

The data of the bullet fired.

Returns

bool

true if the event should be processed; otherwise, false to ignore it.

OnPlayerShotPlayerObject(IPlayer, IPlayerObject, ref PlayerBulletData)

Called when a player fires a shot that hits a player-owned object.

bool OnPlayerShotPlayerObject(IPlayer player, IPlayerObject target, ref PlayerBulletData bulletData)

Parameters

player IPlayer

The player who fired the shot.

target IPlayerObject

The player-owned object that was hit by the shot.

bulletData PlayerBulletData

The data of the bullet fired.

Returns

bool

true if the event should be processed; otherwise, false to ignore it.

OnPlayerShotVehicle(IPlayer, IVehicle, ref PlayerBulletData)

Called when a player fires a shot that hits a vehicle.

bool OnPlayerShotVehicle(IPlayer player, IVehicle target, ref PlayerBulletData bulletData)

Parameters

player IPlayer

The player who fired the shot.

target IVehicle

The vehicle that was hit by the shot.

bulletData PlayerBulletData

The data of the bullet fired.

Returns

bool

true if the event should be processed; otherwise, false to ignore it.