Fuel (7)

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.

CanCheckFuel

  • Called when a player tries to loot a vehicle's fuel container.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches EntityFuelSystem.IsInFuelInteractionRange of Assembly-CSharp.dll.

Example
object CanCheckFuel(EntityFuelSystem EntityFuelSystem , StorageContainer StorageContainer , BasePlayer BasePlayer )
{
    Puts("CanCheckFuel was called!");
    return (bool) null;
}

CanUseFuel

  • Called before a vehicle fuel system consumes fuel.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches EntityFuelSystem.TryUseFuel of Assembly-CSharp.dll.

Example
object CanUseFuel(EntityFuelSystem EntityFuelSystem , StorageContainer StorageContainer , float Single , float Single )
{
    Puts("CanUseFuel was called!");
    return (bool) null;
}
  • Called when the amount of fuel in a vehicle is being determined.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches EntityFuelSystem.GetFuelAmount of Assembly-CSharp.dll.

Example
object OnFuelAmountCheck(EntityFuelSystem EntityFuelSystem , Item Item )
{
    Puts("OnFuelAmountCheck was called!");
    return (int) null;
}
  • Called when determining whether a vehicle has sufficient fuel.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches EntityFuelSystem.HasFuel of Assembly-CSharp.dll.

Example
object OnFuelCheck(EntityFuelSystem EntityFuelSystem )
{
    Puts("OnFuelCheck was called!");
    return (bool) null;
}
  • Called right before fuel is used (furnace, lanterns, camp fires, etc.).

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

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

Example
object OnFuelConsume(BaseOven BaseOven )
{
    Puts("OnFuelConsume was called!");
    return (object) null;
}
  • Called after fuel is used (furnace, lanterns, camp fires, etc.).

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

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

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

This hook requires OnFuelConsume, which loads alongside OnFuelConsumed.

  • Called when determining which item should be used to fuel a vehicle.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches EntityFuelSystem.GetFuelItem of Assembly-CSharp.dll.

Example
object OnFuelItemCheck(EntityFuelSystem EntityFuelSystem , StorageContainer StorageContainer )
{
    Puts("OnFuelItemCheck was called!");
    return (Item) null;
}

Last updated