Item (72)

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.

  • 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 self)
{
    Puts("CanAcceptItem was called!");
    return (ItemContainer.CanAcceptResult) null;
}
  • 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 self, DroppedItem di)
{
    Puts("CanCombineDroppedItem was called!");
    return (object) null;
}
  • 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 player, Deployer self, NetworkableId local2)
{
    Puts("CanDeployItem was called!");
    return (object) null;
}
  • 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 self)
{
    Puts("CanEquipItem was called!");
    return (bool) null;
}
  • 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 self, ItemCraftTask local2, int taskID)
{
    Puts("CanFastTrackCraftTask was called!");
    return (bool) null;
}
  • 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 self)
{
    Puts("CanLockerAcceptItem was called!");
    return (bool) null;
}
  • 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 local5, PlayerInventory self, ItemContainerId local1, int local2, int local3, ItemMoveModifier local4)
{
    Puts("CanMoveItem was called!");
    return (object) null;
}
  • 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 self, Item item)
{
    Puts("CanStackItem was called!");
    return (bool) null;
}
  • 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 self)
{
    Puts("CanWearItem was called!");
    return (bool) null;
}
  • 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 local0, PlayerInventory self)
{
    Puts("OnBackpackDrop was called!");
    return (object) null;
}
  • 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 local5, BasePlayer local0)
{
    Puts("OnBonusItemDrop was called!");
    return (object) null;
}
  • 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 local5, BasePlayer local0)
{
    Puts("OnBonusItemDropped was called!");
}

This hook requires OnBonusItemDrop, which loads alongside OnBonusItemDropped.

  • 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
object OnBonusItemDropped()
{
    Puts("OnBonusItemDropped [patch 1] was called!");
    return (object) null;
}

This hook requires OnBonusItemDropped, which loads alongside 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
object OnBonusItemDropped()
{
    Puts("OnBonusItemDropped [patch 2] was called!");
    return (object) null;
}

This hook requires OnBonusItemDropped [patch 1], which loads alongside 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
object OnBonusItemDropped()
{
    Puts("OnBonusItemDropped [patch 3] was called!");
    return (object) null;
}

This hook requires OnBonusItemDropped [patch 2], which loads alongside 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
object OnBonusItemDropped()
{
    Puts("OnBonusItemDropped [patch 4] was called!");
    return (object) null;
}

This hook requires OnBonusItemDropped [patch 3], which loads alongside 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
object OnBonusItemDropped()
{
    Puts("OnBonusItemDropped [patch 5] was called!");
    return (object) null;
}

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

  • 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 self)
{
    Puts("OnDroppedItemCombined was called!");
}
  • 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 self)
{
    Puts("OnFindBurnable was called!");
    return (Item) null;
}
  • 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 self)
{
    Puts("OnHealingItemUse was called!");
    return (object) null;
}
  • 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 self)
{
    Puts("OnInventoryAmmoFind was called!");
    return (object) null;
}
  • 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 inventory, Chainsaw self)
{
    Puts("OnInventoryAmmoItemFind was called!");
    return (Item) null;
}
  • 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 inventory, FlameThrower self)
{
    Puts("OnInventoryAmmoItemFind was called!");
    return (Item) null;
}
  • 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 self)
{
    Puts("OnInventoryItemsCount was called!");
    return (int) null;
}
  • 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 self)
{
    Puts("OnInventoryItemsFind was called!");
    return (List<Item>) null;
}
  • 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 self)
{
    Puts("OnInventoryItemsTake was called!");
    return (int) null;
}
  • 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 local2, string local1, BasePlayer player)
{
    Puts("OnItemAction was called!");
    return (object) null;
}
  • 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 self)
{
    Puts("OnItemAddedToContainer was called!");
}
  • 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 local0, BasePlayer owner, Item fromTempBlueprint)
{
    Puts("OnItemCraft was called!");
    return (bool) null;
}
  • 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 local1, ItemCrafter self)
{
    Puts("OnItemCraftCancelled was called!");
}
  • 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!");
}
  • 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 self, ItemModDeployable local5, BaseEntity local6)
{
    Puts("OnItemDeployed was called!");
}
  • 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 self, BaseEntity local1, BaseEntity local4)
{
    Puts("OnItemDeployed was called!");
}
  • 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 self)
{
    Puts("OnItemDespawn was called!");
}
  • 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 self, BaseEntity local1)
{
    Puts("OnItemDropped was called!");
}
  • 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 self, int targetSlot)
{
    Puts("OnItemFilter was called!");
    return (bool) null;
}
  • 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
object OnItemLock()
{
    Puts("OnItemLock was called!");
    return (object) null;
}
  • 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 self, Item local0, BasePlayer player, System.Byte[] local1)
{
    Puts("OnItemPainted was called!");
}
  • 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;
}
  • 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 local3, Recycler self)
{
    Puts("OnItemRecycle was called!");
    return (object) null;
}
  • 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()
{
    Puts("OnItemRecycle was called!");
    return (object) null;
}

This hook requires OnItemRecycle, which loads alongside OnItemRecycle.

  • 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 local3, int local4, Recycler self)
{
    Puts("OnItemRecycleAmount was called!");
}

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

  • 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 player)
{
    Puts("OnItemRefill was called!");
    return (object) null;
}
  • 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 self)
{
    Puts("OnItemRemove was called!");
    return (object) null;
}
  • 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 self)
{
    Puts("OnItemRemovedFromContainer was called!");
}
  • 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 player, Item itemToRepair)
{
    Puts("OnItemRepair was called!");
    return (object) null;
}
  • 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 self, Item local1, BasePlayer local0)
{
    Puts("OnItemResearch was called!");
}

This hook requires CanResearchItem, which loads alongside OnItemResearch.

  • 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 self, int local2)
{
    Puts("OnItemResearched was called!");
}
  • 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 local2, Item local6, RepairBench self, BasePlayer local1)
{
    Puts("OnItemSkinChange was called!");
    return (object) null;
}
  • 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 self)
{
    Puts("OnItemSplit was called!");
    return (Item) null;
}
  • 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 local11, Item self, ItemContainer newcontainer, int local13)
{
    Puts("OnItemStacked was called!");
}
  • 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 local20, Item self, ItemContainer newcontainer)
{
    Puts("OnItemStacked was called!");
}

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

  • 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 local0, Mailbox self, BasePlayer fromPlayer)
{
    Puts("OnItemSubmit was called!");
    return (object) null;
}
  • 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
object OnItemUnlock()
{
    Puts("OnItemUnlock was called!");
    return (object) null;
}

This hook requires OnItemLock, which loads alongside OnItemUnlock.

  • 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 player, ItemModUnwrap self)
{
    Puts("OnItemUnwrap was called!");
    return (object) null;
}
  • 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 local0, BasePlayer player)
{
    Puts("OnItemUpgrade was called!");
}
  • 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 self, int amountToConsume)
{
    Puts("OnItemUse was called!");
}
  • 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!");
}
  • 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 self)
{
    Puts("OnMaxStackable was called!");
    return (int) null;
}
  • 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 local4, ItemDefinition local7, BasePlayer local0, WeaponRack self)
{
    Puts("OnRackedWeaponLoad was called!");
    return (object) null;
}
  • 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 local4, ItemDefinition local7, BasePlayer local0, WeaponRack self)
{
    Puts("OnRackedWeaponLoaded was called!");
}

This hook requires OnRackedWeaponLoad, which loads alongside OnRackedWeaponLoaded.

  • 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 player, WeaponRack self)
{
    Puts("OnRackedWeaponMount was called!");
    return (bool) null;
}
  • 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 player, WeaponRack self)
{
    Puts("OnRackedWeaponMounted was called!");
}

This hook requires OnRackedWeaponMount, which loads alongside OnRackedWeaponMounted.

  • 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 local0, WeaponRackSlot local2, BasePlayer player, WeaponRack self)
{
    Puts("OnRackedWeaponSwap was called!");
    return (object) null;
}
  • 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 local0, WeaponRackSlot local2, BasePlayer player, WeaponRack self)
{
    Puts("OnRackedWeaponSwapped was called!");
}

This hook requires OnRackedWeaponSwap, which loads alongside OnRackedWeaponSwapped.

  • 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 local1, BasePlayer player, WeaponRack self)
{
    Puts("OnRackedWeaponTake was called!");
    return (object) null;
}
  • 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 local1, BasePlayer player, WeaponRack self)
{
    Puts("OnRackedWeaponTaken was called!");
}

This hook requires OnRackedWeaponTake, which loads alongside OnRackedWeaponTaken.

  • 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 local1, BasePlayer player, WeaponRack self)
{
    Puts("OnRackedWeaponUnload was called!");
    return (object) null;
}
  • 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 local1, BasePlayer player, WeaponRack self)
{
    Puts("OnRackedWeaponUnloaded was called!");
}

This hook requires OnRackedWeaponUnload, which loads alongside OnRackedWeaponUnloaded.

  • 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;
}
  • 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 info)
{
    Puts("OnResearchCostDetermine was called!");
    return (int) null;
}

Last updated