snaaaa
February 27, 2023, 7:25am
42
You can change the pump models in the config file
Config.PumpModels = {
[-2007231801] = {z = 2.3},
[1339433404] = {z = 2.3},
[1694452750] = {z = 2.3},
[1933174915] = {z = 2.3},
[-462817101] = {z = 1.8},
[-469694731] = {z = 1.6},
[-164877493] = {z = 1.6},
[1467552538] = {z = 1.6, electric = true}, --Tesla supercharger
}
You just need to specify the hash and if it is electric
1 Like
WFDon
February 27, 2023, 2:07pm
43
Sorry, there’s another question, maybe it’s a bug, but DrawTextLocation doesn’t work correctly - when I change it to right it still stays to the left of the car. Maybe I misunderstood the purpose of this config?
snaaaa
February 27, 2023, 6:56pm
44
Hey yes it is possible this is an option from the qb part of the resource and not used in ESX, i will remove this option in the esx version
how exactly does the applyfuel function work?
K_Ray
March 10, 2023, 3:31pm
46
does it come with a gas level indicator for the hud?
hey, someone can help me to change the fueling/charging notification like in LegacyFuel (3dText above the car) ? The sound of the esx notification is annoying …
snaaaa
March 13, 2023, 12:17am
48
No, but i’ve added instructions to adapt your existing hud in the readme
hi there it seems the vehicle is getting random fuel level when taking out from garage any fix?
just apply sna-fuel exports
Apply where??? I already apply in es_extended side
added the export in my garage script but still the same
and i dont think is a garage script is in sna fuel managefuelusage side
if not DecorExistOn(vehicle, Config.FuelDecor) then
ApplyFuel(vehicle, math.random(200, 800) / 10)
end
Does Ox_inventory works with this or not? Especially the jerrycans
1 Like
My server is using the QB-Core framework, and I have encountered a problem. My HUD did not read fuel correctly
CreateThread(function()
while true do
if IsPedInAnyVehicle(Player, false) then
local Vehicle = GetVehiclePedIsIn(Player, false)
local Speed = math.floor(GetEntitySpeed(Vehicle) * SpeedMultiplier)
local Rpm = math.floor(GetVehicleCurrentRpm(Vehicle) * 100)
local VehicleHealth = GetVehicleEngineHealth(Vehicle)
local Fuel
if Config.UseLegacyFuel then
Fuel = exports['qb-sna-fuel']:GetFuel(Vehicle)
else
Fuel = GetVehicleFuelLevel(Vehicle)
end
SendNUIMessage({
action = "VehicleInfo",
vehicleSpeed = Speed,
rpm = Rpm,
vehicleHealth = VehicleHealth,
speedUnit = Config.SpeedUnit,
fuel = Fuel,
cruise = Cruise,
seatBelt = SeatBelt
})
end
Wait(150)
end
end)
is there a way to make it work without a target source, like legacyfuel
so I found a bug here when refueling that makes your money go to negative. I’m using ox_inventory.
never mind I fixed this and managed to optimized the script using ox