Electronic (17)

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 a player is trying to press a button.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches PressButton.RPC_Press of Assembly-CSharp.dll.

Example
object OnButtonPress(PressButton self, BasePlayer player)
{
    Puts("OnButtonPress was called!");
    return (object) null;
}
  • Called when a player is trying to swipe a card.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches CardReader.ServerCardSwiped of Assembly-CSharp.dll.

Example
object OnCardSwipe(CardReader self, Keycard local1, BasePlayer player)
{
    Puts("OnCardSwipe was called!");
    return (object) null;
}
  • Called when a player attempts to change the direction of a CCTV camera to face them.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches CCTV_RC.Server_SetDir of Assembly-CSharp.dll.

Example
object OnCCTVDirectionChange(CCTV_RC self, BasePlayer local0)
{
    Puts("OnCCTVDirectionChange was called!");
    return (object) null;
}
  • Called when a player ties to toggle a power counter between modes.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches PowerCounter.ToggleDisplayMode of Assembly-CSharp.dll.

Example
object OnCounterModeToggle()
{
    Puts("OnCounterModeToggle was called!");
    return (object) null;
}
  • Called when a player tries to change the target number of a power counter.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches PowerCounter.SERVER_SetTarget of Assembly-CSharp.dll.

Example
object OnCounterTargetChange()
{
    Puts("OnCounterTargetChange was called!");
    return (object) null;
}
  • Called when a player tries to remote control an entity.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches AutoTurret.CanControl of Assembly-CSharp.dll.

Example
object OnEntityControl(AutoTurret self)
{
    Puts("OnEntityControl was called!");
    return (bool) null;
}
  • Called when a player tries to remote control an entity.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

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

Example
object OnEntityControl(PoweredRemoteControlEntity self)
{
    Puts("OnEntityControl was called!");
    return (bool) null;
}
  • Called when a player tries to remote control an entity.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches RemoteControlEntity.CanControl of Assembly-CSharp.dll.

Example
object OnEntityControl(RemoteControlEntity self)
{
    Puts("OnEntityControl was called!");
    return (bool) null;
}
  • Called just after the excavator supply computer is triggered, before the plane is spawned.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches ExcavatorSignalComputer.RequestSupplies of Assembly-CSharp.dll.

Example
object OnExcavatorSuppliesRequest(ExcavatorSignalComputer self, BasePlayer player)
{
    Puts("OnExcavatorSuppliesRequest was called!");
    return (object) null;
}
  • Called after the excavator signal computer was triggered, just after the supply plane is spawned.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches ExcavatorSignalComputer.RequestSupplies of Assembly-CSharp.dll.

Example
void OnExcavatorSuppliesRequested(ExcavatorSignalComputer self, BasePlayer player, BaseEntity local0)
{
    Puts("OnExcavatorSuppliesRequested was called!");
}

This hook requires OnExcavatorSuppliesRequest, which loads alongside OnExcavatorSuppliesRequested.

  • Called when an input of IOEntity is updated.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches IOEntity.UpdateFromInput of Assembly-CSharp.dll.

Example
object OnInputUpdate(IOEntity self)
{
    Puts("OnInputUpdate was called!");
    return (object) null;
}
  • Called after a wire has been disconnected from an electrical entity, such as when its connected entity was destroyed or when a player removed the wire.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches IORef.Clear of Assembly-CSharp.dll.

Example
void OnIORefCleared(IOEntity.IORef self)
{
    Puts("OnIORefCleared was called!");
}

This hook requires OnIORefCleared [patch], which loads alongside OnIORefCleared.

  • Called when outputs of IOEntity are updated.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches IOEntity.UpdateOutputs of Assembly-CSharp.dll.

Example
object OnOutputUpdate(IOEntity self)
{
    Puts("OnOutputUpdate was called!");
    return (object) null;
}
  • Called when a player tries to update a phone name.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches PhoneController.UpdatePhoneName of Assembly-CSharp.dll.

Example
object OnPhoneNameUpdate(PhoneController self, string local0, BasePlayer player)
{
    Puts("OnPhoneNameUpdate was called!");
    return (object) null;
}
  • Called after a player has updated a phone name.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches PhoneController.UpdatePhoneName of Assembly-CSharp.dll.

Example
void OnPhoneNameUpdated(PhoneController self, PhoneController self1, BasePlayer player)
{
    Puts("OnPhoneNameUpdated was called!");
}

This hook requires OnPhoneNameUpdate, which loads alongside OnPhoneNameUpdated.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches HBHFSensor.UpdatePassthroughAmount of Assembly-CSharp.dll.

Example
object OnSensorDetect()
{
    Puts("OnSensorDetect was called!");
    return (object) null;
}
  • Called when a solar panel updates the amount of energy it is getting from the sun.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches SolarPanel.SunUpdate of Assembly-CSharp.dll.

Example
object OnSolarPanelSunUpdate(SolarPanel self, int local0)
{
    Puts("OnSolarPanelSunUpdate was called!");
    return (object) null;
}

Last updated