Entity (112)

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.

  • Useful for overriding hostility of an entity.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BaseCombatEntity.IsHostile of Assembly-CSharp.dll.

Example
object CanEntityBeHostile(BaseCombatEntity self)
{
    Puts("CanEntityBeHostile was called!");
    return (bool) null;
}
  • Useful for overriding hostility of an entity.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BasePlayer.IsHostile of Assembly-CSharp.dll.

Example
object CanEntityBeHostile(BasePlayer self)
{
    Puts("CanEntityBeHostile was called!");
    return (bool) null;
}
  • Called when a Timed Explosive is attempting to stick to another entity.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches TimedExplosive.CanStickTo of Assembly-CSharp.dll.

Example
object CanExplosiveStick(TimedExplosive self)
{
    Puts("CanExplosiveStick was called!");
    return (bool) null;
}
  • Can the Patrol Helicopter see the player.

  • Returning a non-null value cancels default behavior.

  • This hook is Carbon-only compatible.

  • Patches PatrolHelicopterAI.PlayerVisible.

Example
object CanPatrolHeliSeePlayer(PatrolHelicopterAI heli, BasePlayer player)
{
    Puts("CanPatrolHeliSeePlayer was called!");
    return (bool) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is Carbon-only compatible.

  • Patches WeaponRack.GivePlayerAllWeapons.

Example
object CanPickupAllFromRack(WeaponRack rack, BasePlayer player, int mountSlotIndex)
{
    Puts("CanPickupAllFromRack was called!");
    return (bool) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is Carbon-only compatible.

  • Patches WeaponRack.GivePlayerWeapon.

Example
object CanPickupFromRack(WeaponRack rack, BasePlayer player, Item item, int mountSlotIndex, int playerBeltIndex, bool tryHold)
{
    Puts("CanPickupFromRack was called!");
    return (bool) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is Carbon-only compatible.

  • Patches WeaponRack.MountWeapon.

Example
object CanPlaceOnRack(WeaponRack rack, BasePlayer player, Item item, int gridCellIndex, int rotation)
{
    Puts("CanPlaceOnRack was called!");
    return (bool) null;
}
  • Useful for canceling the shoot of SamSite.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches SamSite.WeaponTick of Assembly-CSharp.dll.

Example
object CanSamSiteShoot(SamSite self)
{
    Puts("CanSamSiteShoot was called!");
    return (object) null;
}
  • Called when a player is looking at a hidden stash.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BasePlayer.CheckStashRevealInvoke of Assembly-CSharp.dll.

Example
object CanSeeStash(BasePlayer self, StashContainer entity)
{
    Puts("CanSeeStash was called!");
    return (object) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches WaterBall.DoSplash of Assembly-CSharp.dll.

Example
object CanWaterBallSplash(ItemDefinition liquidDef, UnityEngine.Vector3 position, float radius, int amount)
{
    Puts("CanWaterBallSplash was called!");
    return (bool) null;
}
  • Called when an airdrop has been called.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches CargoPlane.UpdateDropPosition of Assembly-CSharp.dll.

Example
void OnAirdrop(CargoPlane self)
{
    Puts("OnAirdrop was called!");
}
  • Called right after a player completes a survey crater analysis.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches SurveyCrater.AnalysisComplete of Assembly-CSharp.dll.

Example
void OnAnalysisComplete(SurveyCrater self, BasePlayer player)
{
    Puts("OnAnalysisComplete was called!");
}
  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches SleepingBag.RPC_MakeBed of Assembly-CSharp.dll.

Example
void OnBedMade(SleepingBag self, BasePlayer player)
{
    Puts("OnBedMade was called!");
}
  • Called when a specific item is lost on the big wheel game.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BigWheelGame.Payout of Assembly-CSharp.dll.

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

This hook requires OnBigWheelWin, which loads alongside OnBigWheelLoss.

  • Called before multiplier is applied.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BigWheelGame.Payout of Assembly-CSharp.dll.

Example
object OnBigWheelWin()
{
    Puts("OnBigWheelWin was called!");
    return (object) null;
}
  • Useful for overriding a building privilege on specific entities and etc.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BaseEntity.GetBuildingPrivilege of Assembly-CSharp.dll.

Example
object OnBuildingPrivilege(BaseEntity self, OBB obb)
{
    Puts("OnBuildingPrivilege was called!");
    return (BuildingPrivlidge) null;
}
  • Called right after a supply signal has called a cargo plane.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches SupplySignal.Explode of Assembly-CSharp.dll.

Example
void OnCargoPlaneSignaled(BaseEntity local0, SupplySignal self)
{
    Puts("OnCargoPlaneSignaled was called!");
}
  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches CargoShip.StartEgress of Assembly-CSharp.dll.

Example
object OnCargoShipEgress(CargoShip self)
{
    Puts("OnCargoShipEgress was called!");
    return (object) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is Carbon-only compatible.

  • Patches CargoShip.StartHarborApproach of Assembly-CSharp.dll.

Example
object OnCargoShipHarborApproach(CargoShip self)
{
    Puts("OnCargoShipHarborApproach was called!");
    return (object) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is Carbon-only compatible.

  • Patches CargoShip.OnArrivedAtHarbor of Assembly-CSharp.dll.

Example
void OnCargoShipHarborArrived(CargoShip self)
{
    Puts("OnCargoShipHarborArrived was called!");
}
  • Returning a non-null value cancels default behavior.

  • This hook is Carbon-only compatible.

  • Patches CargoShip.LeaveHarbor of Assembly-CSharp.dll.

Example
void OnCargoShipHarborLeave(CargoShip self)
{
    Puts("OnCargoShipHarborLeave was called!");
}
  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches CargoShip.RespawnLoot of Assembly-CSharp.dll.

Example
object OnCargoShipSpawnCrate(CargoShip self)
{
    Puts("OnCargoShipSpawnCrate was called!");
    return (object) null;
}
  • Overrides the amount of comfort chairs give to players.

  • Returning a non-null value cancels default behavior.

  • This hook is Carbon-only compatible.

  • Patches BaseChair.GetComfort.

Example
object OnChairComfort(BaseChair chair)
{
    Puts("OnChairComfort was called!");
    return (float) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches Composter.UpdateComposting of Assembly-CSharp.dll.

Example
object OnComposterUpdate(Composter self)
{
    Puts("OnComposterUpdate was called!");
    return (object) null;
}
  • Called when a container is destroyed and all items are about to be dropped.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches DropUtil.DropItems of Assembly-CSharp.dll.

Example
object OnContainerDropItems(ItemContainer container)
{
    Puts("OnContainerDropItems was called!");
    return (object) null;
}
  • Called when a locked crate from the CH47 (Chinook) has dropped.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches HackableLockedCrate.SetWasDropped of Assembly-CSharp.dll.

Example
void OnCrateDropped(HackableLockedCrate self)
{
    Puts("OnCrateDropped was called!");
}
  • Called when a player starts hacking a locked crate.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches HackableLockedCrate.StartHacking of Assembly-CSharp.dll.

Example
void OnCrateHack(HackableLockedCrate self)
{
    Puts("OnCrateHack was called!");
}
  • Called when a player stops hacking a locked crate.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches HackableLockedCrate.HackProgress of Assembly-CSharp.dll.

Example
void OnCrateHackEnd(HackableLockedCrate self)
{
    Puts("OnCrateHackEnd was called!");
}
  • Called when a locked crate from the CH47 (Chinook) has landed.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches HackableLockedCrate.LandCheck of Assembly-CSharp.dll.

Example
void OnCrateLanded(HackableLockedCrate self)
{
    Puts("OnCrateLanded was called!");
}
  • Returning a non-null value cancels default behavior.

  • This hook is Carbon-only compatible.

  • Patches HackableLockedCrate.OnAttacked of Assembly-CSharp.dll.

Example
object OnCrateLaptopAttack(HackableLockedCrate self, HitInfo info)
{
    Puts("OnCrateLaptopAttack was called!");
    return (object) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches DecayEntity.DecayTick of Assembly-CSharp.dll.

Example
object OnDecayDamage(DecayEntity self)
{
    Puts("OnDecayDamage was called!");
    return (object) null;
}

This hook requires OnDecayHeal, which loads alongside OnDecayDamage.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches DecayEntity.DecayTick of Assembly-CSharp.dll.

Example
object OnDecayHeal(DecayEntity self)
{
    Puts("OnDecayHeal was called!");
    return (object) null;
}
  • Called when a player is trying to toggle diesel engine.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches DieselEngine.EngineSwitch of Assembly-CSharp.dll.

Example
object OnDieselEngineToggle(DieselEngine self, BasePlayer player)
{
    Puts("OnDieselEngineToggle was called!");
    return (object) null;
}
  • Called when diesel engine is toggled.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches DieselEngine.EngineOff of Assembly-CSharp.dll.

Example
void OnDieselEngineToggled(DieselEngine self)
{
    Puts("OnDieselEngineToggled was called!");
}
  • Called when diesel engine is toggled.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches DieselEngine.EngineOn of Assembly-CSharp.dll.

Example
void OnDieselEngineToggled(DieselEngine self)
{
    Puts("OnDieselEngineToggled was called!");
}
  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches IsActiveItem.Test of Assembly-CSharp.dll.

Example
object OnEntityActiveCheck(BaseEntity ent, BasePlayer player, uint id, string debugName)
{
    Puts("OnEntityActiveCheck was called!");
    return (bool) null;
}
  • HitInfo might be null, check it before use.

  • Editing hitInfo has no effect because the death has already happened.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BaseCombatEntity.Die of Assembly-CSharp.dll.

Example
void OnEntityDeath(BaseCombatEntity self)
{
    Puts("OnEntityDeath was called!");
}
  • HitInfo might be null, check it before use.

  • Editing hitInfo has no effect because the death has already happened.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches ResourceEntity.OnKilled of Assembly-CSharp.dll.

Example
void OnEntityDeath(ResourceEntity self)
{
    Puts("OnEntityDeath was called!");
}
  • Called right before a CH47Helicopter or BradleyAPC is destroyed.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches CH47HelicopterAIController.OnKilled of Assembly-CSharp.dll.

Example
object OnEntityDestroy(CH47HelicopterAIController self)
{
    Puts("OnEntityDestroy was called!");
    return (object) null;
}
  • Called right before a CH47Helicopter or BradleyAPC is destroyed.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BradleyAPC.OnKilled of Assembly-CSharp.dll.

Example
object OnEntityDestroy(BradleyAPC self)
{
    Puts("OnEntityDestroy was called!");
    return (object) null;
}
  • Called when an entity is dismounted by a player.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BaseMountable.DismountPlayer of Assembly-CSharp.dll.

Example
void OnEntityDismounted(BaseMountable self, BasePlayer player)
{
    Puts("OnEntityDismounted was called!");
}

This hook requires CanDismountEntity, which loads alongside OnEntityDismounted.

  • Called when an entity is dismounted by a player.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BaseMountable.DismountPlayer of Assembly-CSharp.dll.

Example
void OnEntityDismounted(BaseMountable self, BasePlayer player)
{
    Puts("OnEntityDismounted was called!");
}

This hook requires OnEntityDismounted, which loads alongside OnEntityDismounted.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches MaxDistance.Test of Assembly-CSharp.dll.

Example
object OnEntityDistanceCheck(BaseEntity ent, BasePlayer player, uint id, string debugName, float maximumDistance, bool checkParent)
{
    Puts("OnEntityDistanceCheck was called!");
    return (bool) null;
}
  • Called when an entity enters a trigger (water area, radiation zone, hurt zone, etc.).

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches TriggerBase.OnEntityEnter of Assembly-CSharp.dll.

Example
object OnEntityEnter(TriggerBase self)
{
    Puts("OnEntityEnter was called!");
    return (object) null;
}
  • Called when an entity enters a trigger (water area, radiation zone, hurt zone, etc.).

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches TriggerComfort.OnEntityEnter of Assembly-CSharp.dll.

Example
object OnEntityEnter(TriggerComfort self)
{
    Puts("OnEntityEnter was called!");
    return (object) null;
}
  • Called after an entity's flags have been updated on the server, before they are sent over the network.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BaseEntity.SendNetworkUpdate_Flags of Assembly-CSharp.dll.

Example
object OnEntityFlagsNetworkUpdate(BaseEntity self)
{
    Puts("OnEntityFlagsNetworkUpdate was called!");
    return (object) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches FromOwner.Test of Assembly-CSharp.dll.

Example
object OnEntityFromOwnerCheck(BaseEntity ent, BasePlayer player, uint id, string debugName)
{
    Puts("OnEntityFromOwnerCheck was called!");
    return (bool) null;
}
  • Called when an entity (sleepingbag, sign, furnace,...) is going to be destroyed because the buildingblock it is on was removed.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches DestroyOnGroundMissing.OnGroundMissing of Assembly-CSharp.dll.

Example
object OnEntityGroundMissing(BaseEntity local0)
{
    Puts("OnEntityGroundMissing was called!");
    return (object) null;
}
  • Called when an entity is destroyed.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BaseNetworkable.Kill of Assembly-CSharp.dll.

Example
object OnEntityKill(BaseNetworkable self)
{
    Puts("OnEntityKill was called!");
    return (object) null;
}
  • Called when an entity leaves a trigger (water area, radiation zone, hurt zone, etc.).

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches TriggerBase.OnEntityLeave of Assembly-CSharp.dll.

Example
object OnEntityLeave(TriggerBase self)
{
    Puts("OnEntityLeave was called!");
    return (object) null;
}
  • Called when an entity leaves a trigger (water area, radiation zone, hurt zone, etc.).

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches TriggerComfort.OnEntityLeave of Assembly-CSharp.dll.

Example
object OnEntityLeave(TriggerComfort self)
{
    Puts("OnEntityLeave was called!");
    return (object) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BaseNetworkable.Load of Assembly-CSharp.dll.

Example
void OnEntityLoaded(BaseNetworkable entity, BaseNetworkable.LoadInfo info)
{
    Puts("OnEntityLoaded was called!");
}
  • Useful for denying marking the entity hostile.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BaseCombatEntity.MarkHostileFor of Assembly-CSharp.dll.

Example
object OnEntityMarkHostile(BaseCombatEntity self)
{
    Puts("OnEntityMarkHostile was called!");
    return (object) null;
}
  • Useful for denying marking the entity hostile.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BasePlayer.MarkHostileFor of Assembly-CSharp.dll.

Example
object OnEntityMarkHostile(BasePlayer self)
{
    Puts("OnEntityMarkHostile was called!");
    return (object) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BaseCombatEntity.OnPickedUp of Assembly-CSharp.dll.

Example
void OnEntityPickedUp(BaseCombatEntity self)
{
    Puts("OnEntityPickedUp was called!");
}
  • Gets called whenever the entity is about to be saved for streaming.

  • Called after a BaseNetworkable has been saved to a ProtoBuf object and is about to be serialized to a network stream or network cache.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BaseNetworkable.ToStream.

Example
void OnEntitySaved(BaseNetworkable networkable, BaseNetworkable.SaveInfo info)
{
    Puts("OnEntitySaved was called!");
}
  • Called when an entity snapshot is about to be sent to a client connection.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BaseNetworkable.SendAsSnapshot of Assembly-CSharp.dll.

Example
object OnEntitySnapshot(BaseNetworkable self, Network.Connection connection)
{
    Puts("OnEntitySnapshot was called!");
    return (object) null;
}
  • Called when an entity snapshot is about to be sent to a client connection.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BasePlayer.SendEntitySnapshot of Assembly-CSharp.dll.

Example
object OnEntitySnapshot(BaseNetworkable ent, BasePlayer self)
{
    Puts("OnEntitySnapshot was called!");
    return (object) null;
}
  • Called before any networked entity has spawned (including trees).

  • Returning a non-null value cancels default behavior.

  • This hook is Carbon-only compatible.

  • Patches BaseNetworkable.Spawn.

Example
void OnEntitySpawn(BaseNetworkable networkable)
{
    Puts("OnEntitySpawn was called!");
}
  • Called after any networked entity has spawned (including trees).

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BaseNetworkable.Spawn of Assembly-CSharp.dll.

Example
void OnEntitySpawned(BaseNetworkable self)
{
    Puts("OnEntitySpawned was called!");
}
  • Called when stability of an entity is checked.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches StabilityEntity.StabilityCheck of Assembly-CSharp.dll.

Example
object OnEntityStabilityCheck(StabilityEntity self)
{
    Puts("OnEntityStabilityCheck was called!");
    return (object) null;
}
  • Alternatively, modify the HitInfo object to change the damage.

  • It should be okay to set the damage to 0, but if you don't return non-null, the player's client will receive a damage indicator (if entity is a BasePlayer).

  • HitInfo has all kinds of useful things in it, such as Weapon, damageProperties or damageTypes.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches ResourceEntity.OnAttacked of Assembly-CSharp.dll.

Example
object OnEntityTakeDamage(ResourceEntity self)
{
    Puts("OnEntityTakeDamage was called!");
    return (object) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches IsVisible.Test of Assembly-CSharp.dll.

Example
object OnEntityVisibilityCheck(BaseEntity ent, BasePlayer player, uint id, string debugName, float maximumDistance)
{
    Puts("OnEntityVisibilityCheck was called!");
    return (bool) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches TriggeredEventPrefab.RunEvent of Assembly-CSharp.dll.

Example
object OnEventTrigger(TriggeredEventPrefab self)
{
    Puts("OnEventTrigger was called!");
    return (object) null;
}
  • Called just before setting the hitch.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches HitchTrough.AttemptToHitch of Assembly-CSharp.dll.

Example
object OnHorseHitch()
{
    Puts("OnHorseHitch was called!");
    return (bool) null;
}
  • Called when a player tries to lead a horse.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BaseRidableAnimal.RPC_Lead of Assembly-CSharp.dll.

Example
object OnHorseLead(BaseRidableAnimal self, BasePlayer local0)
{
    Puts("OnHorseLead was called!");
    return (object) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches HitchTrough.Unhitch of Assembly-CSharp.dll.

Example
object OnHorseUnhitch(RidableHorse horse, HitchTrough.HitchSpot local2)
{
    Puts("OnHorseUnhitch was called!");
    return (object) null;
}
  • Called when a player tries to toggle a hot air balloon on or off.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches HotAirBalloon.EngineSwitch of Assembly-CSharp.dll.

Example
object OnHotAirBalloonToggle(HotAirBalloon self, BasePlayer player)
{
    Puts("OnHotAirBalloonToggle was called!");
    return (object) null;
}
  • Called right after a player has toggled a hot air balloon on or off.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches HotAirBalloon.EngineSwitch of Assembly-CSharp.dll.

Example
void OnHotAirBalloonToggled(HotAirBalloon self, BasePlayer player)
{
    Puts("OnHotAirBalloonToggled was called!");
}

This hook requires OnHotAirBalloonToggle, which loads alongside OnHotAirBalloonToggled.

  • Called right after a player has toggled a hot air balloon on or off.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches HotAirBalloon.EngineSwitch of Assembly-CSharp.dll.

Example
void OnHotAirBalloonToggled(HotAirBalloon self, BasePlayer player)
{
    Puts("OnHotAirBalloonToggled was called!");
}

This hook requires OnHotAirBalloonToggled [on], which loads alongside OnHotAirBalloonToggled.

  • Called when a player is attempting to fill a liquid vessel.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BaseLiquidVessel.FillCheck of Assembly-CSharp.dll.

Example
object OnLiquidVesselFill(BaseLiquidVessel self, BasePlayer local0, LiquidContainer local3)
{
    Puts("OnLiquidVesselFill was called!");
    return (object) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches MixingTable.SVSwitch of Assembly-CSharp.dll.

Example
object OnMixingTableToggle(MixingTable self, BasePlayer player)
{
    Puts("OnMixingTableToggle was called!");
    return (object) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is Carbon-only compatible.

  • Patches PatrolHelicopterAI.NoGoZoneAdded of Assembly-CSharp.dll.

Example
object OnNoGoZoneAdded(PatrolHelicopterAI self)
{
    Puts("OnNoGoZoneAdded was called!");
    return (object) null;
}
  • Called before an oven cooks an item.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

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

Example
object OnOvenCook(BaseOven self, Item local0)
{
    Puts("OnOvenCook was called!");
    return (object) null;
}
  • Called after an oven cooks an item.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

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

Example
void OnOvenCooked(BaseOven self, Item local0, BaseEntity local1)
{
    Puts("OnOvenCooked was called!");
}

This hook requires OnOvenCook, which loads alongside OnOvenCooked.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

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

Example
object OnOvenStart(BaseOven self)
{
    Puts("OnOvenStart was called!");
    return (object) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

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

Example
void OnOvenStarted(BaseOven self)
{
    Puts("OnOvenStarted was called!");
}

This hook requires OnOvenStart, which loads alongside OnOvenStarted.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

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

Example
object OnOvenTemperature(BaseOven self)
{
    Puts("OnOvenTemperature was called!");
    return (float) null;
}
  • Called when an oven (Campfire, Furnace,...) is turned on or off.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

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

Example
object OnOvenToggle(BaseOven self, BasePlayer player)
{
    Puts("OnOvenToggle was called!");
    return (object) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is Carbon-only compatible.

  • Patches PatrolHelicopter.Hurt of Assembly-CSharp.dll.

Example
object OnPatrolHelicopterKill(PatrolHelicopter self, HitInfo info)
{
    Puts("OnPatrolHelicopterKill was called!");
    return (object) null;
}

This hook requires OnPatrolHelicopterTakeDamage, which loads alongside OnPatrolHelicopterKill.

  • Returning a non-null value cancels default behavior.

  • This hook is Carbon-only compatible.

  • Patches PatrolHelicopter.Hurt of Assembly-CSharp.dll.

Example
object OnPatrolHelicopterTakeDamage(PatrolHelicopter self)
{
    Puts("OnPatrolHelicopterTakeDamage was called!");
    return (object) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches InstantCameraTool.TakePhoto of Assembly-CSharp.dll.

Example
object OnPhotoCapture(PhotoEntity local5, Item local1, BasePlayer local0, System.Byte[] local2)
{
    Puts("OnPhotoCapture was called!");
    return (object) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches InstantCameraTool.TakePhoto of Assembly-CSharp.dll.

Example
void OnPhotoCaptured(PhotoEntity local5, Item local1, BasePlayer local0, System.Byte[] local2)
{
    Puts("OnPhotoCaptured was called!");
}

This hook requires OnPhotoCapture, which loads alongside OnPhotoCaptured.

  • Whenever a weapon was picked up from the rack.

  • Returning a non-null value cancels default behavior.

  • This hook is Carbon-only compatible.

  • Patches WeaponRack.GivePlayerWeapon.

Example
void OnPickupFromRack(WeaponRack rack, BasePlayer player, Item item, int mountSlotIndex, int playerBeltIndex, bool tryHold)
{
    Puts("OnPickupFromRack was called!");
}

This hook requires CanPickupFromRack, which loads alongside OnPickupFromRack.

  • Returning a non-null value cancels default behavior.

  • This hook is Carbon-only compatible.

  • Patches PlanterBox.FertilizeGrowables of Assembly-CSharp.dll.

Example
object OnPlanterBoxFertilize(PlanterBox self)
{
    Puts("OnPlanterBoxFertilize was called!");
    return (object) null;
}
  • Called after the reactive target is reset.

  • No return behaviour.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches ReactiveTarget.ResetTarget of Assembly-CSharp.dll.

Example
void OnReactiveTargetReset(ReactiveTarget self)
{
    Puts("OnReactiveTargetReset was called!");
}
  • Called when a recycler is turned on or off.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

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

Example
object OnRecyclerToggle(Recycler self, BasePlayer player)
{
    Puts("OnRecyclerToggle was called!");
    return (object) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches PoweredRemoteControlEntity.UpdateIdentifier of Assembly-CSharp.dll.

Example
object OnRemoteIdentifierUpdate(PoweredRemoteControlEntity self, string newID)
{
    Puts("OnRemoteIdentifierUpdate was called!");
    return (object) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches SamSite.ToggleDefenderMode of Assembly-CSharp.dll.

Example
object OnSamSiteModeToggle(SamSite self, BasePlayer local0, bool local1)
{
    Puts("OnSamSiteModeToggle was called!");
    return (object) null;
}
  • Called before last target visible time is updated.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches SamSite.TargetScan of Assembly-CSharp.dll.

Example
object OnSamSiteTarget()
{
    Puts("OnSamSiteTarget was called!");
    return (object) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches SamSite.TargetScan of Assembly-CSharp.dll.

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

This hook requires OnSamSiteTarget, which loads alongside OnSamSiteTargetScan.

  • Called when a player tries to remove a sleeping bag from their respawn screen.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches SleepingBag.DestroyBag of Assembly-CSharp.dll.

Example
object OnSleepingBagDestroy()
{
    Puts("OnSleepingBagDestroy was called!");
    return (object) null;
}
  • Called after a player removes a sleeping bag from their respawn screen.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches SleepingBag.DestroyBag of Assembly-CSharp.dll.

Example
void OnSleepingBagDestroyed(SleepingBag local1, ulong userID)
{
    Puts("OnSleepingBagDestroyed was called!");
}

This hook requires OnSleepingBagDestroy, which loads alongside OnSleepingBagDestroyed.

  • Called when determining if a sleeping bag is a valid respawn location for a player.

  • Useful in conjunction with OnRespawnInformationGiven since a custom sleeping bag will need to pass this check.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches SleepingBag.ValidForPlayer of Assembly-CSharp.dll.

Example
object OnSleepingBagValidCheck(SleepingBag self, ulong playerID, bool ignoreTimers)
{
    Puts("OnSleepingBagValidCheck was called!");
    return (bool) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches SprayCanSpray.Server_RequestWaterClear of Assembly-CSharp.dll.

Example
object OnSprayRemove(SprayCanSpray self, BasePlayer local0)
{
    Puts("OnSprayRemove was called!");
    return (object) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches Sprinkler.DoSplash of Assembly-CSharp.dll.

Example
void OnSprinklerSplashed(Sprinkler self)
{
    Puts("OnSprinklerSplashed was called!");
}
  • Called when a player reveals a hidden stash.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BasePlayer.CheckStashRevealInvoke of Assembly-CSharp.dll.

Example
void OnStashExposed(StashContainer entity, BasePlayer self)
{
    Puts("OnStashExposed was called!");
}

This hook requires CanSeeStash, which loads alongside OnStashExposed.

  • Called when a player hides a stash.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches StashContainer.RPC_HideStash of Assembly-CSharp.dll.

Example
void OnStashHidden(StashContainer self, BasePlayer player)
{
    Puts("OnStashHidden was called!");
}

This hook requires CanHideStash, which loads alongside OnStashHidden.