STG ScriptsDocumentation
Advanced Fuel

Configuration

Every option in STG Advanced Fuel config.lua and webhook.lua, from fuel types, prices and consumption to pumps, blips, electric cars and Discord logs.

General settings live in stg-fuel/config.lua, Discord logs in stg-fuel/webhook.lua. Both files stay editable in the escrow version. Restart the resource after a change.

Framework

STG.Framework = "auto"

auto looks for qb-core, then es_extended, then qbx_core and uses the first one that is running. Set esx, qb or qbox to force one.

Language

STG.Language = "en"

Available: en, de, fr, es, pt, it, nl, pl, sv, ar, jp, zh. To change a text, edit the matching file in stg-fuel/locales/.

General

STG.Debugger = false
STG.FuelUse = 0.4
STG.Marker = true

Prop

Type

When the tank reaches zero, the engine is turned off and cannot run until the vehicle is refueled. Every tank holds 100, so one liter in the menu is one percent of the tank.

Exempt vehicle classes

STG.SpecialClass = {
  13, -- Cycles
  14, -- boats
  15, -- helicopters
  16, -- planes
  21, -- trains
}

Vehicle classes that never use fuel. Their tank is kept at 100. The class numbers are listed in the GetVehicleClass native.

Notifications

STG.Notify = function(text)
  lib.notify({
      title = "Gas Station",
      description = text,
      type = "info",
      duration = 3000,
  })
end

Shows every message of the script, such as wrong fuel, not enough money or a full tank. Replace the body to use your own notification system.

Prices and units

STG.Settings = {
  fuelPrices = {
    dieselPrice = 1.5,
    superPrice = 1.7,
    superplusPrice = 1.9,
    electroPrice = 0.5,
  },
  currency = "$",
  unit = "Liter",
  unit2 = "LITERS",
}

Prop

Type

Players pay with Pay by Cash from their cash or Pay by Card from their bank account.

Fuel type per vehicle class

STG.Cars = {
  [0] = {
    label = "Diesel",
    name = "diesel"
  },
  -- ...
  [6] = {
    label = "Super",
    name = "super"
  },
  [7] = {
    label = "Super Plus",
    name = "superplus"
  },
  -- ...
  ["electro"] = {
    label = "Electric",
    name = "electro"
  }
}

Each key is a vehicle class from 0 to 18 and sets the fuel that class takes. By default sports cars (6) take Super, super cars (7) take Super Plus and every other class takes Diesel. The electro entry is the fuel of the electric cars below.

Prop

Type

The menu selects the right fuel for the car when it opens. If the player pays for another fuel type, the payment is refused with a wrong fuel message.

Electric cars

STG.Cars["electricalCars"] = {
  "TEZERACT",
}

Vehicles in this list can only be charged with Electric, and Electric is refused for every other vehicle. Use the display name of the model in capitals, for example TEZERACT or NEON.

Modified vehicles

STG.Usemodifier = true

STG.Modified = {
  {
    name = 'ADDER',
    class = 0,
  }
}

Gives a vehicle model another class than its GTA class, so it takes a different fuel. This is marked as a beta feature in the config.

Prop

Type

Pumps

STG.Pumpmodels = {
  "prop_gas_pump_old2",
  "prop_gas_pump_old3",
  "prop_gas_pump_1a",
  "prop_gas_pump_1b",
  "prop_gas_pump_1c",
  "prop_gas_pump_1d"
}

Pump props players can fuel at. A player sitting in a vehicle within 6 meters of one of these props sees the open prompt and opens the fuel menu with E. Add the model names of pumps from your own MLOs or maps here.

Blips

STG.Blips = {
  info = {
    text = "Gas Station",
    sprite = 361,
    display = 4,
    color = 2,
    scale = 0.8
  },
  blips = {
    {x = 49.4187, y = 2778.793, z = 58.043},
    -- ...
  }
}

Prop

Type

The blips only mark the stations on the map. Fueling works at every pump in STG.Pumpmodels, with or without a blip.

Discord logs

STG.Usehooks = false

STG.embed = {
  username = "Fuel Station",
  logo = "logo.png",
  webhook = ""
}

Prop

Type

Each log shows the player ID, character name, identifier and the amount paid. These settings are in stg-fuel/webhook.lua.

Still having trouble?

Open a ticket on our Discord. Our team answers around 15 hours a day.

Get help on Discord

On this page