Class CustomWeapon
The Custom Weapon base class.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Exiled.CustomItems.API.Features
Assembly: Exiled.CustomItems.dll
Syntax
public abstract class CustomWeapon : CustomItem
Properties
| Improve this Doc View SourceAttachments
Gets or sets value indicating what InventorySystem.Items.Firearms.Attachments.Components.Attachments the weapon will have.
Declaration
public virtual AttachmentName[] Attachments { get; set; }
Property Value
Type | Description |
---|---|
InventorySystem.Items.Firearms.Attachments.AttachmentName[] |
ClipSize
Gets or sets a value indicating how big of a clip the weapon will have.
Declaration
public virtual byte ClipSize { get; set; }
Property Value
Type | Description |
---|---|
System.Byte |
Damage
Gets or sets the weapon damage.
Declaration
public abstract float Damage { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
FriendlyFire
Gets or sets a value indicating whether or not to allow friendly fire with this weapon on FF-enabled servers.
Declaration
public virtual bool FriendlyFire { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Type
Declaration
public override ItemType Type { get; set; }
Property Value
Type | Description |
---|---|
ItemType |
Overrides
Methods
| Improve this Doc View SourceGive(Player, Boolean)
Declaration
public override void Give(Player player, bool displayMessage = true)
Parameters
Type | Name | Description |
---|---|---|
Player | player | |
System.Boolean | displayMessage |
Overrides
| Improve this Doc View SourceOnHurting(HurtingEventArgs)
Handles hurting for custom weapons.
Declaration
protected virtual void OnHurting(HurtingEventArgs ev)
Parameters
Type | Name | Description |
---|---|---|
HurtingEventArgs | ev |
OnReloading(ReloadingWeaponEventArgs)
Handles reloading for custom weapons.
Declaration
protected virtual void OnReloading(ReloadingWeaponEventArgs ev)
Parameters
Type | Name | Description |
---|---|---|
ReloadingWeaponEventArgs | ev |
OnShooting(ShootingEventArgs)
Handles shooting for custom weapons.
Declaration
protected virtual void OnShooting(ShootingEventArgs ev)
Parameters
Type | Name | Description |
---|---|---|
ShootingEventArgs | ev |
OnShot(ShotEventArgs)
Handles shot for custom weapons.
Declaration
protected virtual void OnShot(ShotEventArgs ev)
Parameters
Type | Name | Description |
---|---|---|
ShotEventArgs | ev |
Spawn(Vector3, Item, Player)
Declaration
public override Pickup Spawn(Vector3 position, Item item, Player previousOwner = null)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector3 | position | |
Item | item | |
Player | previousOwner |
Returns
Type | Description |
---|---|
Pickup |
Overrides
| Improve this Doc View SourceSpawn(Vector3, Player)
Declaration
public override Pickup Spawn(Vector3 position, Player previousOwner = null)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector3 | position | |
Player | previousOwner |
Returns
Type | Description |
---|---|
Pickup |
Overrides
| Improve this Doc View SourceSubscribeEvents()
Declaration
protected override void SubscribeEvents()
Overrides
| Improve this Doc View SourceUnsubscribeEvents()
Declaration
protected override void UnsubscribeEvents()