Item (73)

All currently available hooks that are found in Carbon. Most hooks would be ones compatible with Oxide, although there are Carbon-only ones as well.

CanAcceptItem

  • Called when attempting to put an item in a container.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches ItemContainer.CanAcceptItem of Assembly-CSharp.dll.

Example
object CanAcceptItem(ItemContainer ItemContainer )
{
    Puts("CanAcceptItem was called!");
    return (ItemContainer.CanAcceptResult) null;
}

CanCombineDroppedItem

  • Called when an item is dropped on another item.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches DroppedItem.OnDroppedOn of Assembly-CSharp.dll.

Example
object CanCombineDroppedItem(DroppedItem DroppedItem , DroppedItem DroppedItem )
{
    Puts("CanCombineDroppedItem was called!");
    return (object) null;
}

CanDeployItem

  • Useful for denying items' deployment.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches Deployer.DoDeploy of Assembly-CSharp.dll.

Example
object CanDeployItem(BasePlayer BasePlayer , Deployer Deployer , NetworkableId NetworkableId )
{
    Puts("CanDeployItem was called!");
    return (object) null;
}

CanEquipItem

  • Called when the player attempts to equip an item.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches PlayerInventory.CanEquipItem of Assembly-CSharp.dll.

Example
object CanEquipItem(PlayerInventory PlayerInventory )
{
    Puts("CanEquipItem was called!");
    return (bool) null;
}

CanFastTrackCraftTask

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches ItemCrafter.FastTrackTask of Assembly-CSharp.dll.

Example
object CanFastTrackCraftTask(ItemCrafter ItemCrafter , ItemCraftTask ItemCraftTask , int Int32 )
{
    Puts("CanFastTrackCraftTask was called!");
    return (bool) null;
}

CanLockerAcceptItem

  • Returning a non-null value cancels default behavior.

  • This hook is Carbon-only compatible.

  • Patches Locker.ItemFilter of Assembly-CSharp.dll.

Example
object CanLockerAcceptItem(Locker Locker )
{
    Puts("CanLockerAcceptItem was called!");
    return (bool) null;
}

CanMoveItem

  • Called when moving an item from one inventory slot to another.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches PlayerInventory.MoveItem of Assembly-CSharp.dll.

Example
object CanMoveItem(Item Item , PlayerInventory PlayerInventory , ItemContainerId ItemContainerId , int Int32 , int Int32 , ItemMoveModifier ItemMoveModifier )
{
    Puts("CanMoveItem was called!");
    return (object) null;
}

CanStackItem

  • Called when moving an item onto another item.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches Item.CanStack of Assembly-CSharp.dll.

Example
object CanStackItem(Item Item , Item Item )
{
    Puts("CanStackItem was called!");
    return (bool) null;
}

CanWearItem

  • Called when the player attempts to equip an item.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches PlayerInventory.CanWearItem of Assembly-CSharp.dll.

Example
object CanWearItem(PlayerInventory PlayerInventory )
{
    Puts("CanWearItem was called!");
    return (bool) null;
}

OnBackpackDrop

  • Returning a non-null value cancels default behavior.

  • This hook is Carbon-only compatible.

  • Patches PlayerInventory.TryDropBackpack of Assembly-CSharp.dll.

Example
object OnBackpackDrop(Item Item , PlayerInventory PlayerInventory )
{
    Puts("OnBackpackDrop was called!");
    return (object) null;
}

OnBonusItemDrop

  • Called when a loot container is about to drop bonus scrap for a player who has a corresponding tea buff.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches LootContainer.DropBonusItems of Assembly-CSharp.dll.

Example
object OnBonusItemDrop(Item Item , BasePlayer BasePlayer )
{
    Puts("OnBonusItemDrop was called!");
    return (object) null;
}

OnBonusItemDropped

  • Called after a loot container has dropped bonus scrap for a player who has a corresponding tea buff.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches LootContainer.DropBonusItems of Assembly-CSharp.dll.

Example
void OnBonusItemDropped(Item Item , BasePlayer BasePlayer )
{
    Puts("OnBonusItemDropped was called!");
}

This hook requires OnBonusItemDrop, which loads alongside OnBonusItemDropped.

OnBonusItemDropped [patch 1]

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches LootContainer.DropBonusItems of Assembly-CSharp.dll.

  • Hook flags:

Example
void OnBonusItemDropped()
{
    Puts("OnBonusItemDropped [patch 1] was called!");
}

This hook requires OnBonusItemDropped, which loads alongside OnBonusItemDropped [patch 1].

OnBonusItemDropped [patch 2]

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches LootContainer.DropBonusItems of Assembly-CSharp.dll.

  • Hook flags:

Example
void OnBonusItemDropped()
{
    Puts("OnBonusItemDropped [patch 2] was called!");
}

This hook requires OnBonusItemDropped [patch 1], which loads alongside OnBonusItemDropped [patch 2].

OnBonusItemDropped [patch 3]

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches LootContainer.DropBonusItems of Assembly-CSharp.dll.

  • Hook flags:

Example
void OnBonusItemDropped()
{
    Puts("OnBonusItemDropped [patch 3] was called!");
}

This hook requires OnBonusItemDropped [patch 2], which loads alongside OnBonusItemDropped [patch 3].

OnBonusItemDropped [patch 4]

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches LootContainer.DropBonusItems of Assembly-CSharp.dll.

  • Hook flags:

Example
void OnBonusItemDropped()
{
    Puts("OnBonusItemDropped [patch 4] was called!");
}

This hook requires OnBonusItemDropped [patch 3], which loads alongside OnBonusItemDropped [patch 4].

OnBonusItemDropped [patch 5]

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches LootContainer.DropBonusItems of Assembly-CSharp.dll.

  • Hook flags:

Example
void OnBonusItemDropped()
{
    Puts("OnBonusItemDropped [patch 5] was called!");
}

This hook requires OnBonusItemDropped [patch 4], which loads alongside OnBonusItemDropped [patch 5].

OnDroppedItemCombined

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches DroppedItem.OnDroppedOn of Assembly-CSharp.dll.

Example
void OnDroppedItemCombined(DroppedItem DroppedItem )
{
    Puts("OnDroppedItemCombined was called!");
}

OnFindBurnable

  • Called when looking for fuel for the oven.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BaseOven.FindBurnable of Assembly-CSharp.dll.

Example
object OnFindBurnable(BaseOven BaseOven )
{
    Puts("OnFindBurnable was called!");
    return (Item) null;
}

OnHealingItemUse

  • Called when a player attempts to use a medical tool.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches MedicalTool.GiveEffectsTo of Assembly-CSharp.dll.

Example
object OnHealingItemUse(MedicalTool MedicalTool )
{
    Puts("OnHealingItemUse was called!");
    return (object) null;
}

OnInventoryAmmoFind

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches PlayerInventory.FindAmmo of Assembly-CSharp.dll.

Example
object OnInventoryAmmoFind(PlayerInventory PlayerInventory )
{
    Puts("OnInventoryAmmoFind was called!");
    return (object) null;
}

OnInventoryAmmoItemFind (Chainsaw)

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches Chainsaw.GetAmmo of Assembly-CSharp.dll.

Example
object OnInventoryAmmoItemFind(PlayerInventory PlayerInventory , Chainsaw Chainsaw )
{
    Puts("OnInventoryAmmoItemFind was called!");
    return (Item) null;
}

OnInventoryAmmoItemFind (FlameThrower)

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches FlameThrower.GetAmmo of Assembly-CSharp.dll.

Example
object OnInventoryAmmoItemFind(PlayerInventory PlayerInventory , FlameThrower FlameThrower )
{
    Puts("OnInventoryAmmoItemFind was called!");
    return (Item) null;
}

OnInventoryItemsCount

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches PlayerInventory.GetAmount of Assembly-CSharp.dll.

Example
object OnInventoryItemsCount(PlayerInventory PlayerInventory )
{
    Puts("OnInventoryItemsCount was called!");
    return (int) null;
}

OnInventoryItemsFind

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches PlayerInventory.FindItemsByItemID of Assembly-CSharp.dll.

Example
object OnInventoryItemsFind(PlayerInventory PlayerInventory )
{
    Puts("OnInventoryItemsFind was called!");
    return (List<Item>) null;
}

OnInventoryItemsTake

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches PlayerInventory.Take of Assembly-CSharp.dll.

Example
object OnInventoryItemsTake(PlayerInventory PlayerInventory )
{
    Puts("OnInventoryItemsTake was called!");
    return (int) null;
}

OnItemAction

  • Called when a button is clicked on an item in the inventory (drop, unwrap, ...).

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches PlayerInventory.ItemCmd of Assembly-CSharp.dll.

Example
object OnItemAction(Item Item , string String , BasePlayer BasePlayer )
{
    Puts("OnItemAction was called!");
    return (object) null;
}

OnItemAddedToContainer

  • Called right after an item was added to a container.

  • An entire stack has to be created, not just adding more wood to a wood stack for example.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches ItemContainer.Insert of Assembly-CSharp.dll.

Example
void OnItemAddedToContainer(ItemContainer ItemContainer )
{
    Puts("OnItemAddedToContainer was called!");
}

OnItemCraft

  • Called right after an item is added to the crafting queue.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches ItemCrafter.CraftItem of Assembly-CSharp.dll.

Example
object OnItemCraft(ItemCraftTask ItemCraftTask , BasePlayer BasePlayer , Item Item )
{
    Puts("OnItemCraft was called!");
    return (bool) null;
}

OnItemCraftCancelled

  • Called before an item has been crafted.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches ItemCrafter.CancelTask of Assembly-CSharp.dll.

Example
void OnItemCraftCancelled(ItemCraftTask ItemCraftTask , ItemCrafter ItemCrafter )
{
    Puts("OnItemCraftCancelled was called!");
}

OnItemCraftFinished

  • Called right after an item has been crafted.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches ItemCrafter.FinishCrafting of Assembly-CSharp.dll.

Example
void OnItemCraftFinished(ItemCraftTask task, Item item, ItemCrafter crafter)
{
    Puts("OnItemCraftFinished was called!");
}

OnItemDeployed (Deployer)

  • Called right after an item has been deployed.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches Deployer.DoDeploy_Regular of Assembly-CSharp.dll.

Example
void OnItemDeployed(Deployer Deployer , ItemModDeployable ItemModDeployable , BaseEntity BaseEntity )
{
    Puts("OnItemDeployed was called!");
}

OnItemDeployed (Deployer)

  • Called right after an item has been deployed.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches Deployer.DoDeploy_Slot of Assembly-CSharp.dll.

Example
void OnItemDeployed(Deployer Deployer , BaseEntity BaseEntity , BaseEntity BaseEntity )
{
    Puts("OnItemDeployed was called!");
}

OnItemDespawn

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches DroppedItem.IdleDestroy of Assembly-CSharp.dll.

Example
void OnItemDespawn(DroppedItem DroppedItem )
{
    Puts("OnItemDespawn was called!");
}

OnItemDropped

  • Called right after an item has been dropped.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches Item.Drop of Assembly-CSharp.dll.

Example
void OnItemDropped(Item Item , BaseEntity BaseEntity )
{
    Puts("OnItemDropped was called!");
}

OnItemFilter

  • Returning a non-null value cancels default behavior.

  • This hook is Carbon-only compatible.

  • Patches StorageContainer.ItemFilter of Assembly-CSharp.dll.

Example
object OnItemFilter(Item Item , StorageContainer StorageContainer , int Int32 )
{
    Puts("OnItemFilter was called!");
    return (bool) null;
}

OnItemLock

  • Called right before an item is locked, such as in a modular car inventory.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches Item.LockUnlock of Assembly-CSharp.dll.

Example
void OnItemLock()
{
    Puts("OnItemLock was called!");
}

OnItemPainted

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches PaintedItemStorageEntity.Server_UpdateImage of Assembly-CSharp.dll.

Example
void OnItemPainted(PaintedItemStorageEntity PaintedItemStorageEntity , Item Item , BasePlayer BasePlayer , System.Byte[] Byte[] )
{
    Puts("OnItemPainted was called!");
}

OnItemPickup

  • Called right after an item has been picked up.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches WorldItem.Pickup of Assembly-CSharp.dll.

Example
object OnItemPickup(Item item, BasePlayer player)
{
    Puts("OnItemPickup was called!");
    return (object) null;
}

OnItemRecycle (Recycler)

  • Called when an item is recycled in a recycler.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches Recycler.RecycleThink of Assembly-CSharp.dll.

Example
object OnItemRecycle(Item Item , Recycler Recycler )
{
    Puts("OnItemRecycle was called!");
    return (object) null;
}

OnItemRecycle (Recycler)

  • Called when an item is recycled in a recycler.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches Recycler.RecycleThink of Assembly-CSharp.dll.

Example
void OnItemRecycle()
{
    Puts("OnItemRecycle was called!");
}

This hook requires OnItemRecycle, which loads alongside OnItemRecycle.

OnItemRecycleAmount

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches Recycler.RecycleThink of Assembly-CSharp.dll.

Example
void OnItemRecycleAmount(Item Item , int Int32 , Recycler Recycler )
{
    Puts("OnItemRecycleAmount was called!");
}

This hook requires OnItemRecycle [2], which loads alongside OnItemRecycleAmount.

OnItemRefill

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches ItemModRepair.ServerCommand of Assembly-CSharp.dll.

Example
object OnItemRefill(Item Item , BasePlayer BasePlayer )
{
    Puts("OnItemRefill was called!");
    return (object) null;
}

OnItemRemove

  • Called before an item is destroyed.

  • Return a non-null value stop item from being destroyed.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches Item.Remove of Assembly-CSharp.dll.

Example
object OnItemRemove(Item Item )
{
    Puts("OnItemRemove was called!");
    return (object) null;
}

OnItemRemovedFromContainer

  • Called right after an item was removed from a container.

  • The entire stack has to be removed for this to be called, not just a little bit.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches ItemContainer.Remove of Assembly-CSharp.dll.

Example
void OnItemRemovedFromContainer(ItemContainer ItemContainer )
{
    Puts("OnItemRemovedFromContainer was called!");
}

OnItemRepair

  • Called right before an item is repaired.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches RepairBench.RepairAnItem of Assembly-CSharp.dll.

Example
object OnItemRepair(BasePlayer BasePlayer , Item Item )
{
    Puts("OnItemRepair was called!");
    return (object) null;
}

OnItemResearch

  • Called right before a player begins to research an item.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches ResearchTable.DoResearch of Assembly-CSharp.dll.

Example
void OnItemResearch(ResearchTable ResearchTable , Item Item , BasePlayer BasePlayer )
{
    Puts("OnItemResearch was called!");
}

This hook requires CanResearchItem, which loads alongside OnItemResearch.

OnItemResearched

  • Called right before a player finishes researching an item.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches ResearchTable.ResearchAttemptFinished of Assembly-CSharp.dll.

Example
void OnItemResearched(ResearchTable ResearchTable , int Int32 )
{
    Puts("OnItemResearched was called!");
}

OnItemSkinChange

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches RepairBench.ChangeSkin of Assembly-CSharp.dll.

Example
object OnItemSkinChange(int Int32 , Item Item , RepairBench RepairBench , BasePlayer BasePlayer )
{
    Puts("OnItemSkinChange was called!");
    return (object) null;
}

OnItemSplit

  • Called right before an item is split into multiple stacks.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches Item.SplitItem of Assembly-CSharp.dll.

Example
object OnItemSplit(Item Item )
{
    Puts("OnItemSplit was called!");
    return (Item) null;
}

OnItemStacked (Item)

  • Called after an item has been stacked.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches Item.MoveToContainer of Assembly-CSharp.dll.

Example
void OnItemStacked(Item Item , Item Item , ItemContainer ItemContainer , int Int32 )
{
    Puts("OnItemStacked was called!");
}

OnItemStacked (Item)

  • Called after an item has been stacked.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches Item.MoveToContainer of Assembly-CSharp.dll.

Example
void OnItemStacked(Item Item , Item Item , ItemContainer ItemContainer )
{
    Puts("OnItemStacked was called!");
}

This hook requires OnItemStacked [1], which loads alongside OnItemStacked.

OnItemSubmit

  • Called when a player submits an item into a mailbox or dropbox.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches Mailbox.SubmitInputItems of Assembly-CSharp.dll.

Example
object OnItemSubmit(Item Item , Mailbox Mailbox , BasePlayer BasePlayer )
{
    Puts("OnItemSubmit was called!");
    return (object) null;
}

OnItemUnlock

  • Called right before an item is unlocked, such as in a modular car inventory.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches Item.LockUnlock of Assembly-CSharp.dll.

Example
void OnItemUnlock()
{
    Puts("OnItemUnlock was called!");
}

This hook requires OnItemLock, which loads alongside OnItemUnlock.

OnItemUnwrap

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches ItemModUnwrap.ServerCommand of Assembly-CSharp.dll.

Example
object OnItemUnwrap(Item Item , BasePlayer BasePlayer , ItemModUnwrap ItemModUnwrap )
{
    Puts("OnItemUnwrap was called!");
    return (object) null;
}

OnItemUpgrade

  • Called right before an item is upgraded.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches ItemModUpgrade.ServerCommand of Assembly-CSharp.dll.

Example
void OnItemUpgrade(Item Item , Item Item , BasePlayer BasePlayer )
{
    Puts("OnItemUpgrade was called!");
}

OnItemUse

  • Called when an item is used.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches Item.UseItem of Assembly-CSharp.dll.

Example
void OnItemUse(Item Item , int Int32 )
{
    Puts("OnItemUse was called!");
}

OnLoseCondition

  • Called right before the condition of the item is modified.

  • Called right before the condition of the item is modified.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches CorePlugin.IOnLoseCondition.

Example
void OnLoseCondition(Item Item , float Single )
{
    Puts("OnLoseCondition was called!");
}

OnMapImageUpdated

  • Called when player updates map item's image.

  • Useful for executing any action when map image is updated.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches MapEntity.ImageUpdate of Assembly-CSharp.dll.

Example
void OnMapImageUpdated()
{
    Puts("OnMapImageUpdated was called!");
}

OnMaxStackable

  • Called when an items max stackable is calculated.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches Item.MaxStackable of Assembly-CSharp.dll.

Example
object OnMaxStackable(Item Item )
{
    Puts("OnMaxStackable was called!");
    return (int) null;
}

OnRackedWeaponLoad

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches WeaponRack.LoadWeaponAmmo of Assembly-CSharp.dll.

Example
object OnRackedWeaponLoad(Item Item , ItemDefinition ItemDefinition , BasePlayer BasePlayer , WeaponRack WeaponRack )
{
    Puts("OnRackedWeaponLoad was called!");
    return (object) null;
}

OnRackedWeaponLoaded

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches WeaponRack.LoadWeaponAmmo of Assembly-CSharp.dll.

Example
void OnRackedWeaponLoaded(Item Item , ItemDefinition ItemDefinition , BasePlayer BasePlayer , WeaponRack WeaponRack )
{
    Puts("OnRackedWeaponLoaded was called!");
}

This hook requires OnRackedWeaponLoad, which loads alongside OnRackedWeaponLoaded.

OnRackedWeaponMount

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches WeaponRack.MountWeapon of Assembly-CSharp.dll.

Example
object OnRackedWeaponMount(Item Item , BasePlayer BasePlayer , WeaponRack WeaponRack )
{
    Puts("OnRackedWeaponMount was called!");
    return (bool) null;
}

OnRackedWeaponMounted

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches WeaponRack.MountWeapon of Assembly-CSharp.dll.

Example
void OnRackedWeaponMounted(Item Item , BasePlayer BasePlayer , WeaponRack WeaponRack )
{
    Puts("OnRackedWeaponMounted was called!");
}

This hook requires OnRackedWeaponMount, which loads alongside OnRackedWeaponMounted.

OnRackedWeaponSwap

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches WeaponRack.SwapPlayerWeapon of Assembly-CSharp.dll.

Example
object OnRackedWeaponSwap(Item Item , WeaponRackSlot WeaponRackSlot , BasePlayer BasePlayer , WeaponRack WeaponRack )
{
    Puts("OnRackedWeaponSwap was called!");
    return (object) null;
}

OnRackedWeaponSwapped

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches WeaponRack.SwapPlayerWeapon of Assembly-CSharp.dll.

Example
void OnRackedWeaponSwapped(Item Item , WeaponRackSlot WeaponRackSlot , BasePlayer BasePlayer , WeaponRack WeaponRack )
{
    Puts("OnRackedWeaponSwapped was called!");
}

This hook requires OnRackedWeaponSwap, which loads alongside OnRackedWeaponSwapped.

OnRackedWeaponTake

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches WeaponRack.GivePlayerWeapon of Assembly-CSharp.dll.

Example
object OnRackedWeaponTake(Item Item , BasePlayer BasePlayer , WeaponRack WeaponRack )
{
    Puts("OnRackedWeaponTake was called!");
    return (object) null;
}

OnRackedWeaponTaken

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches WeaponRack.GivePlayerWeapon of Assembly-CSharp.dll.

Example
void OnRackedWeaponTaken(Item Item , BasePlayer BasePlayer , WeaponRack WeaponRack )
{
    Puts("OnRackedWeaponTaken was called!");
}

This hook requires OnRackedWeaponTake, which loads alongside OnRackedWeaponTaken.

OnRackedWeaponUnload

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches WeaponRack.UnloadWeapon of Assembly-CSharp.dll.

Example
object OnRackedWeaponUnload(Item Item , BasePlayer BasePlayer , WeaponRack WeaponRack )
{
    Puts("OnRackedWeaponUnload was called!");
    return (object) null;
}

OnRackedWeaponUnloaded

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches WeaponRack.UnloadWeapon of Assembly-CSharp.dll.

Example
void OnRackedWeaponUnloaded(Item Item , BasePlayer BasePlayer , WeaponRack WeaponRack )
{
    Puts("OnRackedWeaponUnloaded was called!");
}

This hook requires OnRackedWeaponUnload, which loads alongside OnRackedWeaponUnloaded.

OnResearchCostDetermine (ResearchTable)

  • Called when an item is being scrapped at a research table or when a blueprint is being unlocked in a tech tree.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches ResearchTable.ScrapForResearch of Assembly-CSharp.dll.

Example
object OnResearchCostDetermine(Item Item )
{
    Puts("OnResearchCostDetermine was called!");
    return (int) null;
}

OnResearchCostDetermine (ResearchTable)

  • Called when an item is being scrapped at a research table or when a blueprint is being unlocked in a tech tree.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches ResearchTable.ScrapForResearch of Assembly-CSharp.dll.

Example
object OnResearchCostDetermine(ItemDefinition ItemDefinition )
{
    Puts("OnResearchCostDetermine was called!");
    return (int) null;
}

Last updated