Entity (119)

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 BaseCombatEntity )
{
    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 BasePlayer )
{
    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 TimedExplosive )
{
    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 PatrolHelicopterAI , BasePlayer BasePlayer )
{
    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 WeaponRack , BasePlayer BasePlayer , int Int32 )
{
    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 WeaponRack , BasePlayer BasePlayer , Item Item , int Int32 , int Int32 , bool Boolean )
{
    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 WeaponRack , BasePlayer BasePlayer , Item Item , int Int32 , int Int32 )
{
    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 SamSite )
{
    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 BasePlayer , StashContainer StashContainer )
{
    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 ItemDefinition , UnityEngine.Vector3 Vector3 , float Single , int Int32 )
{
    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 CargoPlane )
{
    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 SurveyCrater , BasePlayer BasePlayer )
{
    Puts("OnAnalysisComplete was called!");
}
  • Returning a non-null value cancels default behavior.

  • This hook is Carbon-only compatible.

  • Patches BaseArcadeMachine.AddScore of Assembly-CSharp.dll.

Example
void OnArcadeScoreAdded(BaseArcadeMachine BaseArcadeMachine , BasePlayer BasePlayer , int Int32 )
{
    Puts("OnArcadeScoreAdded 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 SleepingBag , BasePlayer BasePlayer )
{
    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
void OnBigWheelLoss()
{
    Puts("OnBigWheelLoss was called!");
}

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
void OnBigWheelWin()
{
    Puts("OnBigWheelWin was called!");
}
  • 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 BaseEntity , 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 BaseEntity , SupplySignal SupplySignal )
{
    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 CargoShip )
{
    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 CargoShip )
{
    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 CargoShip )
{
    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 CargoShip )
{
    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 CargoShip )
{
    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 BaseChair )
{
    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 Composter )
{
    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 ItemContainer )
{
    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 HackableLockedCrate )
{
    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 HackableLockedCrate )
{
    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 HackableLockedCrate )
{
    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 HackableLockedCrate )
{
    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 HackableLockedCrate , HitInfo HitInfo )
{
    Puts("OnCrateLaptopAttack was called!");
    return (object) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is Carbon-only compatible.

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

Example
object OnDebrisSpawn(DecayEntity DecayEntity )
{
    Puts("OnDebrisSpawn 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 DecayEntity )
{
    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 DecayEntity )
{
    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 DieselEngine , BasePlayer BasePlayer )
{
    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 DieselEngine )
{
    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 DieselEngine )
{
    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 BaseEntity , BasePlayer BasePlayer , uint UInt32 , string String )
{
    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 BaseCombatEntity )
{
    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 ResourceEntity )
{
    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 CH47HelicopterAIController )
{
    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 BradleyAPC )
{
    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 BaseMountable , BasePlayer BasePlayer )
{
    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 BaseMountable , BasePlayer BasePlayer )
{
    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 BaseEntity , BasePlayer BasePlayer , uint UInt32 , string String , float Single , bool Boolean )
{
    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 TriggerBase )
{
    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 TriggerComfort )
{
    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 BaseEntity )
{
    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 BaseEntity , BasePlayer BasePlayer , uint UInt32 , string String )
{
    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 BaseEntity )
{
    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 BaseNetworkable )
{
    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 TriggerBase )
{
    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 TriggerComfort )
{
    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 BaseCombatEntity )
{
    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 BasePlayer )
{
    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 BaseCombatEntity )
{
    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 BaseNetworkable , BaseNetworkable.SaveInfo SaveInfo )
{
    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 BaseNetworkable , 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 BaseNetworkable , BasePlayer BasePlayer )
{
    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 BaseNetworkable )
{
    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 BaseNetworkable )
{
    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 StabilityEntity )
{
    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 ResourceEntity )
{
    Puts("OnEntityTakeDamage was called!");
    return (object) null;
}
  • Called when a player gets attacked.

  • 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 CorePlugin.IOnBasePlayerAttacked of Carbon.Common.dll.

Example
object OnEntityTakeDamage(BaseCombatEntity BaseCombatEntity , HitInfo HitInfo )
{
    Puts("OnEntityTakeDamage was called!");
    return (bool) 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 BaseEntity , BasePlayer BasePlayer , uint UInt32 , string String , float Single )
{
    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 TriggeredEventPrefab )
{
    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 BaseRidableAnimal , BasePlayer BasePlayer )
{
    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 RidableHorse , HitchTrough.HitchSpot HitchSpot )
{
    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 HotAirBalloon , BasePlayer BasePlayer )
{
    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 HotAirBalloon , BasePlayer BasePlayer )
{
    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 HotAirBalloon , BasePlayer BasePlayer )
{
    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 BaseLiquidVessel , BasePlayer BasePlayer , LiquidContainer LiquidContainer )
{
    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 MixingTable , BasePlayer BasePlayer )
{
    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 PatrolHelicopterAI )
{
    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 BaseOven , Item Item )
{
    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 BaseOven , Item Item , BaseEntity BaseEntity )
{
    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 BaseOven )
{
    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 BaseOven )
{
    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 BaseOven )
{
    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 BaseOven , BasePlayer BasePlayer )
{
    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 PatrolHelicopter , HitInfo HitInfo )
{
    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 PatrolHelicopter )
{
    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 PhotoEntity , Item Item , BasePlayer BasePlayer , System.Byte[] Byte[] )
{
    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 PhotoEntity , Item Item , BasePlayer BasePlayer , System.Byte[] Byte[] )
{
    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 WeaponRack , BasePlayer BasePlayer , Item Item , int Int32 , int Int32 , bool Boolean )
{
    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 PlanterBox )
{
    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 ReactiveTarget )
{
    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 Recycler , BasePlayer BasePlayer )
{
    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 PoweredRemoteControlEntity , string String )
{
    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 SamSite , BasePlayer BasePlayer , bool Boolean )
{
    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
void OnSamSiteTarget()
{
    Puts("OnSamSiteTarget was called!");
}
  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

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

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

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
void OnSleepingBagDestroy()
{
    Puts("OnSleepingBagDestroy was called!");
}
  • 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 SleepingBag , ulong UInt64 )
{
    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 SleepingBag , ulong UInt64 , bool Boolean )
{
    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 SprayCanSpray , BasePlayer BasePlayer )
{
    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 Sprinkler )
{
    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 StashContainer , BasePlayer BasePlayer )
{
    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 StashContainer , BasePlayer BasePlayer )
{
    Puts("OnStashHidden was called!");
}

This hook requires CanHideStash, which loads alongside OnStashHidden.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

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

Example
object OnStashOcclude(StashContainer StashContainer )
{
    Puts("OnStashOcclude was called!");
    return (object) null;
}
  • Called right after a cargo plane has dropped a supply drop.

  • Returning a non-null value cancels default behavior.

  • Thi