Skip to content

Fuel

Abstract

The fuel system is very basic and does not provide any measurement of how far a player has driven. Instead it will remove fuel at a set interval which can be configured.

📁 src/core/plugins/core-fuel/

  • Removes Fuel from 100
  • Removes Fuel in unoccupied vehicles
  • Only removes vehicles with fuel and save ability flag
  • The HUD reflects fuel through Synced Meta that is set

Configuration

📁 src/core/plugins/core-fuel/server/src/config.ts

  • MAXIMUM_FUEL
    • The maximum amount of fuel available for all vehicles.
  • FUEL_LOSS_PER_TICK
    • The amount of fuel to remove on each TIME_BETWEEN_UPDATES
  • TIME_BETWEEN_UPDATES
    • How many milliseconds between each vehicle update
    • Default is 5000 (5s)
  • FUEL_ON_NEW_VEHICLE_CREATE
    • How much fuel to give a new vehicle?
    • Default is 100

Usage

Get in a vehicle. Turn on the engine. Drive around. Watch fuel go away.

Commands

setfuel

Administrative command used to set the current fuel level for the vehicle you are in.

/setfuel [0-100]

Created by Stuyk | Est. 2020