OpenMod Docs OpenMod Docs
OpenMod Docs OpenMod Docs
OpenMod .NET Plugin Framework.

Class UnturnedVehicleDamagingEvent

The event that is triggered when damage is being dealt to a vehicle.

Inheritance
System.Object
UnturnedVehicleEvent
UnturnedVehicleDamagingEvent
Implements
IVehicleEvent
IEvent
ICancellableEvent
Inherited Members
UnturnedVehicleEvent.Vehicle
UnturnedVehicleEvent.IVehicleEvent.Vehicle
Namespace: OpenMod.Unturned.Vehicles.Events
Assembly: OpenMod.Unturned.dll
Syntax
public class UnturnedVehicleDamagingEvent : UnturnedVehicleEvent, IVehicleEvent, IEvent, ICancellableEvent

Constructors

| Improve this Doc View Source

UnturnedVehicleDamagingEvent(UnturnedVehicle, Nullable<CSteamID>, UInt16, EDamageOrigin, Boolean)

Declaration
public UnturnedVehicleDamagingEvent(UnturnedVehicle vehicle, CSteamID? instigator, ushort pendingTotalDamage, EDamageOrigin damageOrigin, bool canRepair)
Parameters
Type Name Description
UnturnedVehicle vehicle
System.Nullable<CSteamID> instigator
System.UInt16 pendingTotalDamage
EDamageOrigin damageOrigin
System.Boolean canRepair

Properties

| Improve this Doc View Source

CanRepair

If set to true, the damage will not explode the vehicle if its greater than the current health.

Declaration
public bool CanRepair { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

DamageOrigin

Gets the damage origin.

Declaration
public EDamageOrigin DamageOrigin { get; }
Property Value
Type Description
EDamageOrigin
| Improve this Doc View Source

Instigator

Gets the ID of the entity causing the damage.

Declaration
public CSteamID? Instigator { get; }
Property Value
Type Description
System.Nullable<CSteamID>
| Improve this Doc View Source

IsCancelled

Declaration
public bool IsCancelled { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

PendingTotalDamage

Gets or sets the total damage to be dealt.

Declaration
public ushort PendingTotalDamage { get; set; }
Property Value
Type Description
System.UInt16

Implements

IVehicleEvent
IEvent
ICancellableEvent

Extension Methods

DisposeHelper.DisposeSyncOrAsync(Object)