Giter Site home page Giter Site logo

lj-fuel's Introduction

LJ FUEL

lj-fuel used with QBCore Framework

Join my Discord laboratory for updates, support, and special early testing!
https://discord.gg/HH6uTcBfew

lj-fuel is a modified version of LegacyFuel using PolyZones like NoPixel 3.0

Dependencies

Installation tutorial video

  • IMPORTANT: Must rename ANY existing LegacyFuel exports to lj-fuel
  • Watch tutorial video [if visual guide needed]

qb-target config (v3.1.2 newest isn't exporting correctly):

  • Find this in qb-target/config
  • Put this in "Config.TargetBones"
Config.TargetBones = {

	["main"] = {
        bones = {
            "door_dside_f",
            "door_dside_r",
            "door_pside_f",
            "door_pside_r"
        },
        options = {
      {
        type = "client",
        event = "lj-fuel:client:SendMenuToServer",
        icon = "fas fa-gas-pump",
        label = "Refuel Vehicle",
      },
        },
          distance = 1.0
    },

}
  • Put this in "Config.TargetModels"
Config.TargetModels = {
	
	["fuel"] = {
        models = {
            "prop_gas_pump_1d",
            "prop_gas_pump_1a",
            "prop_gas_pump_1b",
            "prop_gas_pump_1c",
            "prop_vintage_pump",
            "prop_gas_pump_old2",
            "prop_gas_pump_old3"
        },
      options = {
     {
      type = "client",
      event = "lj-fuel:client:buyCanMenu",
      icon = "fas fa-burn",
      label = "Buy Jerry Can",
     },
     {
      type = "client",
      event = "lj-fuel:client:refuelCanMenu",
      icon = "fas fa-gas-pump",
      label = "Refuel Jerry Can",
    },
      },
    distance = 2.0
  },
  
}

Global Taxes:

  • Put this in qb-core/server/functions.lua
QBCore.Functions.GlobalTax = function(value)
	local tax = (value / 100 * QBConfig.Server.GlobalTax)
	return tax
end
  • Find this in qb-core/config.lua
  • Put this under line 29:
QBConfig.Server.GlobalTax = 15.0

qb-smallresources:

  • Remove this thread in qb-smallresources/client/ignore.lua
Citizen.CreateThread(function()
    while true do
        local ped = PlayerPedId()
        local weapon = GetSelectedPedWeapon(ped)
		if weapon ~= GetHashKey("WEAPON_UNARMED") then
			if IsPedArmed(ped, 6) then
				DisableControlAction(1, 140, true)
				DisableControlAction(1, 141, true)
				DisableControlAction(1, 142, true)
			end

			if weapon == GetHashKey("WEAPON_FIREEXTINGUISHER") or  weapon == GetHashKey("WEAPON_PETROLCAN") then
				if IsPedShooting(ped) then
					SetPedInfiniteAmmo(ped, true, GetHashKey("WEAPON_FIREEXTINGUISHER"))
					SetPedInfiniteAmmo(ped, true, GetHashKey("WEAPON_PETROLCAN"))
				end
			end
		else
			Citizen.Wait(500)
		end
        Citizen.Wait(7)
    end
end)

(removes infinite jerry can and fire extinguisher ammo)

Key Features

  • NoPixel style animation for refueling
  • Gas station polyzone areas targeted with qb-target
  • Fuel price is fully calulated before purchase including taxes
  • Progressbar is synced with refueling amount left for vehicle
  • Buy jerry can from pump
  • Refuel jerry can from pump

Previews

refueling animation

refueling.mp4

refueling vehicle jerry can

refueling vehicle jerry can

polyzones around map

polyzones

refuel interact

qb-target interact

menu price calculation

qb-target interact

pump interaction

qb-target pump interaction

My CSS Edits to Dependencies

Credit

Issues and Suggestions

Please use the GitHub issues system to report issues or make suggestions, when making suggestion, please keep [Suggestion] in the title to make it clear that it is a suggestion.

lj-fuel's People

Contributors

loljoshie avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.