forked from Simnation/Main
Merge branch 'master' of https://git.evolution-state-life.de/Evolution-State-Life/Main
This commit is contained in:
commit
c2edd5d9f0
32 changed files with 6074 additions and 5978 deletions
|
@ -1,16 +1,16 @@
|
|||
# LC_Fuel - FiveM
|
||||
|
||||
## About
|
||||
A fuel system that adds realism and depth to vehicle management. Whether your players drive gas-powered cars, diesel, or electric vehicles, this script ensures an immersive refueling experience.
|
||||
|
||||
## Installation
|
||||
Install steps available on our docs: [Installation - LC Fuel](https://docs.lixeirocharmoso.com/lc_fuel/installation)
|
||||
|
||||
## Exports
|
||||
Exports available in our docs: [Exports - LC Fuel](https://docs.lixeirocharmoso.com/lc_fuel/exports)
|
||||
|
||||
## Our links
|
||||
- Discord: [https://discord.gg/U5YDgbh](https://discord.gg/U5YDgbh)
|
||||
- Tebex: [https://lixeirocharmoso.tebex.io](https://lixeirocharmoso.tebex.io)
|
||||
- Docs: [https://docs.lixeirocharmoso.com](https://docs.lixeirocharmoso.com/lc_fuel)
|
||||
# LC_Fuel - FiveM
|
||||
|
||||
## About
|
||||
A fuel system that adds realism and depth to vehicle management. Whether your players drive gas-powered cars, diesel, or electric vehicles, this script ensures an immersive refueling experience.
|
||||
|
||||
## Installation
|
||||
Install steps available on our docs: [Installation - LC Fuel](https://docs.lixeirocharmoso.com/lc_fuel/installation)
|
||||
|
||||
## Exports
|
||||
Exports available in our docs: [Exports - LC Fuel](https://docs.lixeirocharmoso.com/lc_fuel/exports)
|
||||
|
||||
## Our links
|
||||
- Discord: [https://discord.gg/U5YDgbh](https://discord.gg/U5YDgbh)
|
||||
- Tebex: [https://lixeirocharmoso.tebex.io](https://lixeirocharmoso.tebex.io)
|
||||
- Docs: [https://docs.lixeirocharmoso.com](https://docs.lixeirocharmoso.com/lc_fuel)
|
||||
- Showcase: [https://youtu.be/M6__IeCwxH8](https://youtu.be/M6__IeCwxH8)
|
File diff suppressed because it is too large
Load diff
|
@ -1,153 +1,153 @@
|
|||
-- Do not load anything here if electric is disabled
|
||||
if not Config.Electric.enabled then
|
||||
return
|
||||
end
|
||||
|
||||
local electricChargers = {}
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- Threads
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
-- Create sphere zones for each station, hooking up onEnter/onExit
|
||||
function createElectricZones()
|
||||
assert(Utils.Zones, "You are using an outdated version of lc_utils. Please update your 'lc_utils' script to the latest version: https://github.com/LeonardoSoares98/lc_utils/releases/latest/download/lc_utils.zip")
|
||||
|
||||
local stations = groupChargersByStation()
|
||||
|
||||
for _, station in pairs(stations) do
|
||||
Utils.Zones.createZone({
|
||||
coords = station.center,
|
||||
radius = 50.0,
|
||||
onEnter = function()
|
||||
for _, charger in pairs(station.chargers) do
|
||||
loadElectricCharger(charger)
|
||||
end
|
||||
end,
|
||||
onExit = function()
|
||||
for _, charger in pairs(station.chargers) do
|
||||
unloadElectricCharger(charger)
|
||||
end
|
||||
end
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
-- Thread to detect near electric chargers
|
||||
function createElectricMarkersThread()
|
||||
CreateThread(function()
|
||||
while true do
|
||||
local ped = PlayerPedId()
|
||||
local playerCoords = GetEntityCoords(ped)
|
||||
local pump, pumpModel = GetClosestPump(playerCoords, true)
|
||||
|
||||
while pump and pump > 0 and #(playerCoords - GetEntityCoords(pump)) < 2.0 do
|
||||
playerCoords = GetEntityCoords(ped)
|
||||
if not mainUiOpen and not DoesEntityExist(fuelNozzle) then
|
||||
Utils.Markers.showHelpNotification(cachedTranslations.open_recharge, true)
|
||||
if IsControlJustPressed(0,38) then
|
||||
clientOpenUI(pump, pumpModel, true)
|
||||
end
|
||||
end
|
||||
Wait(2)
|
||||
end
|
||||
Wait(1000)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
function createElectricTargetsThread()
|
||||
local pumpModels = {} -- This will be the final list without duplicates
|
||||
local seenModels = {} -- This acts as a set to track unique values
|
||||
|
||||
for _, chargerData in pairs(Config.Electric.chargersLocation) do
|
||||
local model = chargerData.prop
|
||||
if not seenModels[model] then
|
||||
seenModels[model] = true -- Mark model as seen
|
||||
table.insert(pumpModels, model) -- Insert only if it's not a duplicate
|
||||
end
|
||||
end
|
||||
|
||||
-- Pass unique models to the target creation function
|
||||
Utils.Target.createTargetForModel(pumpModels, openElectricUICallback, Utils.translate('target.open_recharge'), "fas fa-plug", "#00a413",nil,nil,canOpenPumpUiTargetCallback)
|
||||
|
||||
Utils.Target.createTargetForModel(pumpModels,returnNozzle,Utils.translate('target.return_nozzle'),"fas fa-plug","#a42100",nil,nil,canReturnNozzleTargetCallback)
|
||||
end
|
||||
|
||||
function openElectricUICallback()
|
||||
local ped = PlayerPedId()
|
||||
local playerCoords = GetEntityCoords(ped)
|
||||
local pump, pumpModel = GetClosestPump(playerCoords, true)
|
||||
if pump then
|
||||
clientOpenUI(pump, pumpModel, true)
|
||||
else
|
||||
exports['lc_utils']:notify("error", Utils.translate("pump_not_found"))
|
||||
end
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- Utils
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
function loadElectricCharger(chargerData)
|
||||
if not electricChargers[chargerData.location] then
|
||||
RequestModel(chargerData.prop)
|
||||
while not HasModelLoaded(chargerData.prop) do
|
||||
Wait(10)
|
||||
end
|
||||
|
||||
local heading = chargerData.location.w + 180.0
|
||||
local electricCharger = CreateObject(chargerData.prop, chargerData.location.x, chargerData.location.y, chargerData.location.z, false, true, true)
|
||||
SetEntityHeading(electricCharger, heading)
|
||||
FreezeEntityPosition(electricCharger, true)
|
||||
|
||||
electricChargers[chargerData.location] = electricCharger
|
||||
end
|
||||
end
|
||||
|
||||
function unloadElectricCharger(chargerData)
|
||||
local charger = electricChargers[chargerData.location]
|
||||
if charger and DoesEntityExist(charger) then
|
||||
DeleteEntity(charger)
|
||||
electricChargers[chargerData.location] = nil
|
||||
end
|
||||
end
|
||||
|
||||
-- Utility to group chargers by their station
|
||||
function groupChargersByStation()
|
||||
local stations = {}
|
||||
for _, charger in pairs(Config.Electric.chargersLocation) do
|
||||
local assigned = false
|
||||
for _, station in pairs(stations) do
|
||||
local dist = #(station.center - vector3(charger.location.x, charger.location.y, charger.location.z))
|
||||
if dist < 20.0 then
|
||||
table.insert(station.chargers, charger)
|
||||
station.center = (station.center + vector3(charger.location.x, charger.location.y, charger.location.z)) / 2
|
||||
assigned = true
|
||||
break
|
||||
end
|
||||
end
|
||||
if not assigned then
|
||||
table.insert(stations, {
|
||||
center = vector3(charger.location.x, charger.location.y, charger.location.z),
|
||||
chargers = { charger }
|
||||
})
|
||||
end
|
||||
end
|
||||
return stations
|
||||
end
|
||||
|
||||
AddEventHandler('onResourceStop', function(resourceName)
|
||||
if GetCurrentResourceName() ~= resourceName then return end
|
||||
|
||||
deleteAllElectricChargers()
|
||||
end)
|
||||
|
||||
function deleteAllElectricChargers()
|
||||
for _, charger in pairs(electricChargers) do
|
||||
if DoesEntityExist(charger) then
|
||||
DeleteEntity(charger)
|
||||
end
|
||||
end
|
||||
electricChargers = {}
|
||||
-- Do not load anything here if electric is disabled
|
||||
if not Config.Electric.enabled then
|
||||
return
|
||||
end
|
||||
|
||||
local electricChargers = {}
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- Threads
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
-- Create sphere zones for each station, hooking up onEnter/onExit
|
||||
function createElectricZones()
|
||||
assert(Utils.Zones, "You are using an outdated version of lc_utils. Please update your 'lc_utils' script to the latest version: https://github.com/LeonardoSoares98/lc_utils/releases/latest/download/lc_utils.zip")
|
||||
|
||||
local stations = groupChargersByStation()
|
||||
|
||||
for _, station in pairs(stations) do
|
||||
Utils.Zones.createZone({
|
||||
coords = station.center,
|
||||
radius = 50.0,
|
||||
onEnter = function()
|
||||
for _, charger in pairs(station.chargers) do
|
||||
loadElectricCharger(charger)
|
||||
end
|
||||
end,
|
||||
onExit = function()
|
||||
for _, charger in pairs(station.chargers) do
|
||||
unloadElectricCharger(charger)
|
||||
end
|
||||
end
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
-- Thread to detect near electric chargers
|
||||
function createElectricMarkersThread()
|
||||
CreateThread(function()
|
||||
while true do
|
||||
local ped = PlayerPedId()
|
||||
local playerCoords = GetEntityCoords(ped)
|
||||
local pump, pumpModel = GetClosestPump(playerCoords, true)
|
||||
|
||||
while pump and pump > 0 and #(playerCoords - GetEntityCoords(pump)) < 2.0 do
|
||||
playerCoords = GetEntityCoords(ped)
|
||||
if not mainUiOpen and not DoesEntityExist(fuelNozzle) then
|
||||
Utils.Markers.showHelpNotification(cachedTranslations.open_recharge, true)
|
||||
if IsControlJustPressed(0,38) then
|
||||
clientOpenUI(pump, pumpModel, true)
|
||||
end
|
||||
end
|
||||
Wait(2)
|
||||
end
|
||||
Wait(1000)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
function createElectricTargetsThread()
|
||||
local pumpModels = {} -- This will be the final list without duplicates
|
||||
local seenModels = {} -- This acts as a set to track unique values
|
||||
|
||||
for _, chargerData in pairs(Config.Electric.chargersLocation) do
|
||||
local model = chargerData.prop
|
||||
if not seenModels[model] then
|
||||
seenModels[model] = true -- Mark model as seen
|
||||
table.insert(pumpModels, model) -- Insert only if it's not a duplicate
|
||||
end
|
||||
end
|
||||
|
||||
-- Pass unique models to the target creation function
|
||||
Utils.Target.createTargetForModel(pumpModels, openElectricUICallback, Utils.translate('target.open_recharge'), "fas fa-plug", "#00a413",nil,nil,canOpenPumpUiTargetCallback)
|
||||
|
||||
Utils.Target.createTargetForModel(pumpModels,returnNozzle,Utils.translate('target.return_nozzle'),"fas fa-plug","#a42100",nil,nil,canReturnNozzleTargetCallback)
|
||||
end
|
||||
|
||||
function openElectricUICallback()
|
||||
local ped = PlayerPedId()
|
||||
local playerCoords = GetEntityCoords(ped)
|
||||
local pump, pumpModel = GetClosestPump(playerCoords, true)
|
||||
if pump then
|
||||
clientOpenUI(pump, pumpModel, true)
|
||||
else
|
||||
exports['lc_utils']:notify("error", Utils.translate("pump_not_found"))
|
||||
end
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- Utils
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
function loadElectricCharger(chargerData)
|
||||
if not electricChargers[chargerData.location] then
|
||||
RequestModel(chargerData.prop)
|
||||
while not HasModelLoaded(chargerData.prop) do
|
||||
Wait(10)
|
||||
end
|
||||
|
||||
local heading = chargerData.location.w + 180.0
|
||||
local electricCharger = CreateObject(chargerData.prop, chargerData.location.x, chargerData.location.y, chargerData.location.z, false, true, true)
|
||||
SetEntityHeading(electricCharger, heading)
|
||||
FreezeEntityPosition(electricCharger, true)
|
||||
|
||||
electricChargers[chargerData.location] = electricCharger
|
||||
end
|
||||
end
|
||||
|
||||
function unloadElectricCharger(chargerData)
|
||||
local charger = electricChargers[chargerData.location]
|
||||
if charger and DoesEntityExist(charger) then
|
||||
DeleteEntity(charger)
|
||||
electricChargers[chargerData.location] = nil
|
||||
end
|
||||
end
|
||||
|
||||
-- Utility to group chargers by their station
|
||||
function groupChargersByStation()
|
||||
local stations = {}
|
||||
for _, charger in pairs(Config.Electric.chargersLocation) do
|
||||
local assigned = false
|
||||
for _, station in pairs(stations) do
|
||||
local dist = #(station.center - vector3(charger.location.x, charger.location.y, charger.location.z))
|
||||
if dist < 20.0 then
|
||||
table.insert(station.chargers, charger)
|
||||
station.center = (station.center + vector3(charger.location.x, charger.location.y, charger.location.z)) / 2
|
||||
assigned = true
|
||||
break
|
||||
end
|
||||
end
|
||||
if not assigned then
|
||||
table.insert(stations, {
|
||||
center = vector3(charger.location.x, charger.location.y, charger.location.z),
|
||||
chargers = { charger }
|
||||
})
|
||||
end
|
||||
end
|
||||
return stations
|
||||
end
|
||||
|
||||
AddEventHandler('onResourceStop', function(resourceName)
|
||||
if GetCurrentResourceName() ~= resourceName then return end
|
||||
|
||||
deleteAllElectricChargers()
|
||||
end)
|
||||
|
||||
function deleteAllElectricChargers()
|
||||
for _, charger in pairs(electricChargers) do
|
||||
if DoesEntityExist(charger) then
|
||||
DeleteEntity(charger)
|
||||
end
|
||||
end
|
||||
electricChargers = {}
|
||||
end
|
|
@ -1,77 +1,77 @@
|
|||
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- Fuel consumption chart
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
if Config.FuelConsumptionChart.enabled then
|
||||
RegisterCommand(Config.FuelConsumptionChart.command,function(source)
|
||||
toggleFuelConsumptionChart()
|
||||
end, false)
|
||||
|
||||
RegisterCommand("fuel_focus", function()
|
||||
if isFuelConsumptionChartOpen then
|
||||
SetNuiFocus(true,true)
|
||||
end
|
||||
end, false)
|
||||
|
||||
RegisterKeyMapping(
|
||||
"fuel_focus", -- command triggered by key
|
||||
"Focus Fuel Chart UI", -- description in keybindings
|
||||
"keyboard",
|
||||
Config.FuelConsumptionChart.focusShortcut
|
||||
)
|
||||
|
||||
function toggleFuelConsumptionChart()
|
||||
loadNuiVariables()
|
||||
if isFuelConsumptionChartOpen then
|
||||
closeFuelConsumptionChartUI()
|
||||
else
|
||||
local ped = PlayerPedId()
|
||||
if not IsPedInAnyVehicle(ped, false) then
|
||||
exports['lc_utils']:notify("error",Utils.translate("vehicle_not_found"))
|
||||
return
|
||||
end
|
||||
local vehicle = GetVehiclePedIsIn(ped, false)
|
||||
if GetPedInVehicleSeat(vehicle, -1) ~= ped or IsVehicleBlacklisted(vehicle) then
|
||||
exports['lc_utils']:notify("error",Utils.translate("vehicle_not_found"))
|
||||
return
|
||||
end
|
||||
|
||||
SendNUIMessage({
|
||||
showFuelConsumptionChart = true,
|
||||
isRecording = isRecording,
|
||||
position = Config.FuelConsumptionChart.position,
|
||||
focusShortcut = Config.FuelConsumptionChart.focusShortcut,
|
||||
})
|
||||
isFuelConsumptionChartOpen = true
|
||||
end
|
||||
end
|
||||
|
||||
function updateFuelConsumptionChart(fuelConsumptionData)
|
||||
SendNUIMessage({
|
||||
updateFuelConsumptionChart = true,
|
||||
fuelConsumptionData = fuelConsumptionData,
|
||||
})
|
||||
end
|
||||
|
||||
function closeFuelConsumptionChartUI()
|
||||
SendNUIMessage({
|
||||
hideFuelConsumptionChart = true,
|
||||
})
|
||||
isFuelConsumptionChartOpen = false
|
||||
SetNuiFocus(false,false)
|
||||
end
|
||||
|
||||
function storeDataForChart(vehicle, newFuelLevel, currentConsumption)
|
||||
if not isRecording then
|
||||
updateFuelConsumptionChart({ fuel = nil, speed = nil, consumption = nil })
|
||||
return
|
||||
end
|
||||
|
||||
local speed = GetEntitySpeed(vehicle) * 3.6
|
||||
if isFuelConsumptionChartOpen then
|
||||
updateFuelConsumptionChart({ fuel = newFuelLevel, speed = speed, consumption = currentConsumption })
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- Fuel consumption chart
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
if Config.FuelConsumptionChart.enabled then
|
||||
RegisterCommand(Config.FuelConsumptionChart.command,function(source)
|
||||
toggleFuelConsumptionChart()
|
||||
end, false)
|
||||
|
||||
RegisterCommand("fuel_focus", function()
|
||||
if isFuelConsumptionChartOpen then
|
||||
SetNuiFocus(true,true)
|
||||
end
|
||||
end, false)
|
||||
|
||||
RegisterKeyMapping(
|
||||
"fuel_focus", -- command triggered by key
|
||||
"Focus Fuel Chart UI", -- description in keybindings
|
||||
"keyboard",
|
||||
Config.FuelConsumptionChart.focusShortcut
|
||||
)
|
||||
|
||||
function toggleFuelConsumptionChart()
|
||||
loadNuiVariables()
|
||||
if isFuelConsumptionChartOpen then
|
||||
closeFuelConsumptionChartUI()
|
||||
else
|
||||
local ped = PlayerPedId()
|
||||
if not IsPedInAnyVehicle(ped, false) then
|
||||
exports['lc_utils']:notify("error",Utils.translate("vehicle_not_found"))
|
||||
return
|
||||
end
|
||||
local vehicle = GetVehiclePedIsIn(ped, false)
|
||||
if GetPedInVehicleSeat(vehicle, -1) ~= ped or IsVehicleBlacklisted(vehicle) then
|
||||
exports['lc_utils']:notify("error",Utils.translate("vehicle_not_found"))
|
||||
return
|
||||
end
|
||||
|
||||
SendNUIMessage({
|
||||
showFuelConsumptionChart = true,
|
||||
isRecording = isRecording,
|
||||
position = Config.FuelConsumptionChart.position,
|
||||
focusShortcut = Config.FuelConsumptionChart.focusShortcut,
|
||||
})
|
||||
isFuelConsumptionChartOpen = true
|
||||
end
|
||||
end
|
||||
|
||||
function updateFuelConsumptionChart(fuelConsumptionData)
|
||||
SendNUIMessage({
|
||||
updateFuelConsumptionChart = true,
|
||||
fuelConsumptionData = fuelConsumptionData,
|
||||
})
|
||||
end
|
||||
|
||||
function closeFuelConsumptionChartUI()
|
||||
SendNUIMessage({
|
||||
hideFuelConsumptionChart = true,
|
||||
})
|
||||
isFuelConsumptionChartOpen = false
|
||||
SetNuiFocus(false,false)
|
||||
end
|
||||
|
||||
function storeDataForChart(vehicle, newFuelLevel, currentConsumption)
|
||||
if not isRecording then
|
||||
updateFuelConsumptionChart({ fuel = nil, speed = nil, consumption = nil })
|
||||
return
|
||||
end
|
||||
|
||||
local speed = GetEntitySpeed(vehicle) * 3.6
|
||||
if isFuelConsumptionChartOpen then
|
||||
updateFuelConsumptionChart({ fuel = newFuelLevel, speed = speed, consumption = currentConsumption })
|
||||
end
|
||||
end
|
||||
end
|
10
resources/[carscripts]/lc_fuel/client/client_fuel_type.lua
Normal file
10
resources/[carscripts]/lc_fuel/client/client_fuel_type.lua
Normal file
|
@ -0,0 +1,10 @@
|
|||
RegisterCommand(Config.FuelTypeCommand, function()
|
||||
local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
|
||||
if not DoesEntityExist(vehicle) then
|
||||
exports['lc_utils']:notify("error", Utils.translate("vehicle_not_found"))
|
||||
return
|
||||
end
|
||||
|
||||
local fuelType = getVehicleFuelTypeFromServer(vehicle)
|
||||
exports['lc_utils']:notify("info", Utils.translate("fuel_types.type_title"):format(Utils.translate("fuel_types."..fuelType)))
|
||||
end, false)
|
|
@ -1,140 +1,140 @@
|
|||
local customGasPumps = {}
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- Threads
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
-- Thread to detect near fuel pumps
|
||||
function createGasMarkersThread()
|
||||
CreateThread(function()
|
||||
while true do
|
||||
local ped = PlayerPedId()
|
||||
local playerCoords = GetEntityCoords(ped)
|
||||
local pump, pumpModel = GetClosestPump(playerCoords, false)
|
||||
|
||||
while pump and pump > 0 and #(playerCoords - GetEntityCoords(pump)) < 2.0 do
|
||||
playerCoords = GetEntityCoords(ped)
|
||||
if not mainUiOpen and not DoesEntityExist(fuelNozzle) then
|
||||
Utils.Markers.showHelpNotification(cachedTranslations.open_refuel, true)
|
||||
if IsControlJustPressed(0,38) then
|
||||
clientOpenUI(pump, pumpModel, false)
|
||||
end
|
||||
end
|
||||
Wait(2)
|
||||
end
|
||||
Wait(1000)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
function createGasTargetsThread()
|
||||
local pumpModels = {}
|
||||
for _, v in pairs(Config.GasPumpProps) do
|
||||
table.insert(pumpModels, v.prop)
|
||||
end
|
||||
Utils.Target.createTargetForModel(pumpModels,openFuelUICallback,Utils.translate('target.open_refuel'),"fas fa-gas-pump","#a42100",nil,nil,canOpenPumpUiTargetCallback)
|
||||
|
||||
Utils.Target.createTargetForModel(pumpModels,returnNozzle,Utils.translate('target.return_nozzle'),"fas fa-gas-pump","#a42100",nil,nil,canReturnNozzleTargetCallback)
|
||||
end
|
||||
|
||||
function openFuelUICallback()
|
||||
local ped = PlayerPedId()
|
||||
local playerCoords = GetEntityCoords(ped)
|
||||
local pump, pumpModel = GetClosestPump(playerCoords, false)
|
||||
if pump then
|
||||
clientOpenUI(pump, pumpModel, false)
|
||||
else
|
||||
exports['lc_utils']:notify("error", Utils.translate("pump_not_found"))
|
||||
end
|
||||
end
|
||||
|
||||
function createCustomPumpModelsThread()
|
||||
for _, pumpConfig in pairs(Config.CustomGasPumpLocations) do
|
||||
RequestModel(pumpConfig.prop)
|
||||
|
||||
while not HasModelLoaded(pumpConfig.prop) do
|
||||
Wait(50)
|
||||
end
|
||||
|
||||
local heading = pumpConfig.location.w + 180.0
|
||||
local gasPump = CreateObject(pumpConfig.prop, pumpConfig.location.x, pumpConfig.location.y, pumpConfig.location.z, false, true, true)
|
||||
SetEntityHeading(gasPump, heading)
|
||||
FreezeEntityPosition(gasPump, true)
|
||||
table.insert(customGasPumps, gasPump)
|
||||
end
|
||||
end
|
||||
|
||||
AddEventHandler('onResourceStop', function(resourceName)
|
||||
if GetCurrentResourceName() ~= resourceName then return end
|
||||
|
||||
deleteAllCustomGasPumps()
|
||||
end)
|
||||
|
||||
function deleteAllCustomGasPumps()
|
||||
for k, v in ipairs(customGasPumps) do
|
||||
DeleteEntity(v)
|
||||
end
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- Jerry Cans
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
-- Thread to handle the fuel consumption
|
||||
function createJerryCanThread()
|
||||
CreateThread(function()
|
||||
while true do
|
||||
Wait(1000)
|
||||
local ped = PlayerPedId()
|
||||
if not IsPedInAnyVehicle(ped, false) and GetSelectedPedWeapon(ped) == JERRY_CAN_HASH then
|
||||
refuelLoop(true)
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
-- Code to save jerry can ammo in any inventory
|
||||
local currentWeaponData
|
||||
function updateWeaponAmmo(ammo)
|
||||
ammo = math.floor(ammo) -- This is needed or some inventories will break
|
||||
|
||||
if currentWeaponData and currentWeaponData.info and currentWeaponData.info.ammo then
|
||||
currentWeaponData.info.ammo = ammo
|
||||
end
|
||||
|
||||
TriggerServerEvent('ox_inventory:updateWeapon', "ammo", ammo)
|
||||
TriggerServerEvent("weapons:server:UpdateWeaponAmmo", currentWeaponData, ammo)
|
||||
TriggerServerEvent("qb-weapons:server:UpdateWeaponAmmo", currentWeaponData, ammo)
|
||||
|
||||
if Config.Debug then print("updateWeaponAmmo:ammo",ammo) end
|
||||
if Config.Debug then Utils.Debug.printTable("updateWeaponAmmo:currentWeaponData",currentWeaponData) end
|
||||
|
||||
local ped = PlayerPedId()
|
||||
SetPedAmmo(ped, JERRY_CAN_HASH, ammo)
|
||||
end
|
||||
|
||||
AddEventHandler('weapons:client:SetCurrentWeapon', function(data, bool)
|
||||
if bool ~= false then
|
||||
currentWeaponData = data
|
||||
else
|
||||
currentWeaponData = {}
|
||||
end
|
||||
end)
|
||||
|
||||
AddEventHandler('qb-weapons:client:SetCurrentWeapon', function(data, bool)
|
||||
if bool ~= false then
|
||||
currentWeaponData = data
|
||||
else
|
||||
currentWeaponData = {}
|
||||
end
|
||||
end)
|
||||
|
||||
-- Get jerry can ammo by metadata
|
||||
function getJerryCanAmmo()
|
||||
if currentWeaponData and currentWeaponData.info and currentWeaponData.info.ammo then
|
||||
if Config.Debug then print("getJerryCanAmmo:currentWeaponData.info.ammo", currentWeaponData.info.ammo) end
|
||||
return currentWeaponData.info.ammo
|
||||
end
|
||||
local ped = PlayerPedId()
|
||||
if Config.Debug then print("getJerryCanAmmo:GetAmmoInPedWeapon", GetAmmoInPedWeapon(ped, JERRY_CAN_HASH)) end
|
||||
return GetAmmoInPedWeapon(ped, JERRY_CAN_HASH)
|
||||
local customGasPumps = {}
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- Threads
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
-- Thread to detect near fuel pumps
|
||||
function createGasMarkersThread()
|
||||
CreateThread(function()
|
||||
while true do
|
||||
local ped = PlayerPedId()
|
||||
local playerCoords = GetEntityCoords(ped)
|
||||
local pump, pumpModel = GetClosestPump(playerCoords, false)
|
||||
|
||||
while pump and pump > 0 and #(playerCoords - GetEntityCoords(pump)) < 2.0 do
|
||||
playerCoords = GetEntityCoords(ped)
|
||||
if not mainUiOpen and not DoesEntityExist(fuelNozzle) then
|
||||
Utils.Markers.showHelpNotification(cachedTranslations.open_refuel, true)
|
||||
if IsControlJustPressed(0,38) then
|
||||
clientOpenUI(pump, pumpModel, false)
|
||||
end
|
||||
end
|
||||
Wait(2)
|
||||
end
|
||||
Wait(1000)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
function createGasTargetsThread()
|
||||
local pumpModels = {}
|
||||
for _, v in pairs(Config.GasPumpProps) do
|
||||
table.insert(pumpModels, v.prop)
|
||||
end
|
||||
Utils.Target.createTargetForModel(pumpModels,openFuelUICallback,Utils.translate('target.open_refuel'),"fas fa-gas-pump","#a42100",nil,nil,canOpenPumpUiTargetCallback)
|
||||
|
||||
Utils.Target.createTargetForModel(pumpModels,returnNozzle,Utils.translate('target.return_nozzle'),"fas fa-gas-pump","#a42100",nil,nil,canReturnNozzleTargetCallback)
|
||||
end
|
||||
|
||||
function openFuelUICallback()
|
||||
local ped = PlayerPedId()
|
||||
local playerCoords = GetEntityCoords(ped)
|
||||
local pump, pumpModel = GetClosestPump(playerCoords, false)
|
||||
if pump then
|
||||
clientOpenUI(pump, pumpModel, false)
|
||||
else
|
||||
exports['lc_utils']:notify("error", Utils.translate("pump_not_found"))
|
||||
end
|
||||
end
|
||||
|
||||
function createCustomPumpModelsThread()
|
||||
for _, pumpConfig in pairs(Config.CustomGasPumpLocations) do
|
||||
RequestModel(pumpConfig.prop)
|
||||
|
||||
while not HasModelLoaded(pumpConfig.prop) do
|
||||
Wait(50)
|
||||
end
|
||||
|
||||
local heading = pumpConfig.location.w + 180.0
|
||||
local gasPump = CreateObject(pumpConfig.prop, pumpConfig.location.x, pumpConfig.location.y, pumpConfig.location.z, false, true, true)
|
||||
SetEntityHeading(gasPump, heading)
|
||||
FreezeEntityPosition(gasPump, true)
|
||||
table.insert(customGasPumps, gasPump)
|
||||
end
|
||||
end
|
||||
|
||||
AddEventHandler('onResourceStop', function(resourceName)
|
||||
if GetCurrentResourceName() ~= resourceName then return end
|
||||
|
||||
deleteAllCustomGasPumps()
|
||||
end)
|
||||
|
||||
function deleteAllCustomGasPumps()
|
||||
for k, v in ipairs(customGasPumps) do
|
||||
DeleteEntity(v)
|
||||
end
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- Jerry Cans
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
-- Thread to handle the fuel consumption
|
||||
function createJerryCanThread()
|
||||
CreateThread(function()
|
||||
while true do
|
||||
Wait(1000)
|
||||
local ped = PlayerPedId()
|
||||
if not IsPedInAnyVehicle(ped, false) and GetSelectedPedWeapon(ped) == JERRY_CAN_HASH then
|
||||
refuelLoop(true)
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
-- Code to save jerry can ammo in any inventory
|
||||
local currentWeaponData
|
||||
function updateWeaponAmmo(ammo)
|
||||
ammo = math.floor(ammo) -- This is needed or some inventories will break
|
||||
|
||||
if currentWeaponData and currentWeaponData.info and currentWeaponData.info.ammo then
|
||||
currentWeaponData.info.ammo = ammo
|
||||
end
|
||||
|
||||
TriggerServerEvent('ox_inventory:updateWeapon', "ammo", ammo)
|
||||
TriggerServerEvent("weapons:server:UpdateWeaponAmmo", currentWeaponData, ammo)
|
||||
TriggerServerEvent("qb-weapons:server:UpdateWeaponAmmo", currentWeaponData, ammo)
|
||||
|
||||
if Config.Debug then print("updateWeaponAmmo:ammo",ammo) end
|
||||
if Config.Debug then Utils.Debug.printTable("updateWeaponAmmo:currentWeaponData",currentWeaponData) end
|
||||
|
||||
local ped = PlayerPedId()
|
||||
SetPedAmmo(ped, JERRY_CAN_HASH, ammo)
|
||||
end
|
||||
|
||||
AddEventHandler('weapons:client:SetCurrentWeapon', function(data, bool)
|
||||
if bool ~= false then
|
||||
currentWeaponData = data
|
||||
else
|
||||
currentWeaponData = {}
|
||||
end
|
||||
end)
|
||||
|
||||
AddEventHandler('qb-weapons:client:SetCurrentWeapon', function(data, bool)
|
||||
if bool ~= false then
|
||||
currentWeaponData = data
|
||||
else
|
||||
currentWeaponData = {}
|
||||
end
|
||||
end)
|
||||
|
||||
-- Get jerry can ammo by metadata
|
||||
function getJerryCanAmmo()
|
||||
if currentWeaponData and currentWeaponData.info and currentWeaponData.info.ammo then
|
||||
if Config.Debug then print("getJerryCanAmmo:currentWeaponData.info.ammo", currentWeaponData.info.ammo) end
|
||||
return currentWeaponData.info.ammo
|
||||
end
|
||||
local ped = PlayerPedId()
|
||||
if Config.Debug then print("getJerryCanAmmo:GetAmmoInPedWeapon", GetAmmoInPedWeapon(ped, JERRY_CAN_HASH)) end
|
||||
return GetAmmoInPedWeapon(ped, JERRY_CAN_HASH)
|
||||
end
|
|
@ -1,477 +1,497 @@
|
|||
local refuelingThread = nil
|
||||
local isRefuelling = false
|
||||
local inCooldown = false
|
||||
local vehicleAttachedToNozzle = nil
|
||||
local remainingFuelToRefuel = 0
|
||||
local currentFuelTypePurchased = nil
|
||||
local distanceToCap, distanceToPump = math.maxinteger, math.maxinteger
|
||||
local litersDeductedEachTick = 0.5
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- Refuelling
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
RegisterNetEvent('lc_fuel:getPumpNozzle')
|
||||
AddEventHandler('lc_fuel:getPumpNozzle', function(fuelAmountPurchased, fuelTypePurchased)
|
||||
closeUI()
|
||||
if DoesEntityExist(fuelNozzle) then return end
|
||||
if not currentPump then return end
|
||||
local ped = PlayerPedId()
|
||||
local pumpCoords = GetEntityCoords(currentPump)
|
||||
|
||||
-- Animate the ped to grab the nozzle
|
||||
Utils.Animations.loadAnimDict("anim@am_hold_up@male")
|
||||
TaskPlayAnim(ped, "anim@am_hold_up@male", "shoplift_high", 2.0, 8.0, -1, 50, 0, false, false, false)
|
||||
Wait(300)
|
||||
StopAnimTask(ped, "anim@am_hold_up@male", "shoplift_high", 1.0)
|
||||
|
||||
-- Spawn the nozzle
|
||||
fuelNozzle = createFuelNozzleObject(fuelTypePurchased)
|
||||
|
||||
-- Attach the nozzle
|
||||
attachNozzleToPed()
|
||||
if Config.EnablePumpRope then
|
||||
fuelRope = CreateRopeToPump(pumpCoords)
|
||||
end
|
||||
|
||||
-- Get the max distance the player can go with the nozzle
|
||||
local ropeLength = getNearestPumpRopeLength(fuelTypePurchased, pumpCoords)
|
||||
|
||||
-- Thread to handle fuel nozzle
|
||||
CreateThread(function()
|
||||
while DoesEntityExist(fuelNozzle) do
|
||||
local waitTime = 500
|
||||
local nozzleCoords = GetEntityCoords(fuelNozzle) -- Conside the nozzle position, not the ped
|
||||
distanceToPump = #(pumpCoords - nozzleCoords)
|
||||
-- If player reach the distance limit delete the nozzle
|
||||
if distanceToPump > ropeLength then
|
||||
exports['lc_utils']:notify("error", Utils.translate("too_far_away"))
|
||||
deleteRopeAndNozzleProp()
|
||||
end
|
||||
-- If player is near the distance limit, show a notification to him
|
||||
if distanceToPump > (ropeLength * 0.7) then
|
||||
Utils.Markers.showHelpNotification(Utils.translate("too_far_away"), true)
|
||||
end
|
||||
-- Check if ped entered a vehicle
|
||||
if IsPedSittingInAnyVehicle(ped) then
|
||||
-- Gives him 2 seconds to leave before clearing the nozzle
|
||||
SetTimeout(2000,function()
|
||||
if IsPedSittingInAnyVehicle(ped) and DoesEntityExist(fuelNozzle) then
|
||||
exports['lc_utils']:notify("error", Utils.translate("too_far_away"))
|
||||
deleteRopeAndNozzleProp()
|
||||
end
|
||||
end)
|
||||
end
|
||||
if Utils.Config.custom_scripts_compatibility.target == "disabled" and distanceToPump < 1.5 then
|
||||
waitTime = 2
|
||||
Utils.Markers.showHelpNotification(cachedTranslations.return_nozzle, true)
|
||||
if IsControlJustPressed(0,38) then
|
||||
-- See which one the player is nearer. The fuel cap or fuel pump
|
||||
if distanceToPump < distanceToCap then
|
||||
-- Avoid player press E to return nozzle and press E to refuel in same tick, so it gives preference to refuel
|
||||
Wait(100)
|
||||
returnNozzle()
|
||||
end
|
||||
end
|
||||
end
|
||||
Wait(waitTime)
|
||||
end
|
||||
-- Not near the pump anymore
|
||||
distanceToPump = math.maxinteger
|
||||
end)
|
||||
|
||||
-- Thread to refuel the vehicle
|
||||
CreateThread(function()
|
||||
-- Set the fuel purchased in a global variable
|
||||
remainingFuelToRefuel = fuelAmountPurchased
|
||||
-- Set the fuel type in a global variable
|
||||
currentFuelTypePurchased = fuelTypePurchased
|
||||
-- Trigger the function to allow refuel on markers
|
||||
if Utils.Config.custom_scripts_compatibility.target == "disabled" then
|
||||
refuelLoop(false)
|
||||
end
|
||||
-- Not near the fuel cap anymore
|
||||
distanceToCap = math.maxinteger
|
||||
end)
|
||||
end)
|
||||
|
||||
function returnNozzle()
|
||||
local ped = PlayerPedId()
|
||||
|
||||
if not isRefuelling then
|
||||
Utils.Animations.loadAnimDict("anim@am_hold_up@male")
|
||||
TaskPlayAnim(ped, "anim@am_hold_up@male", "shoplift_high", 2.0, 8.0, -1, 50, 0, false, false, false)
|
||||
Wait(300)
|
||||
StopAnimTask(ped, "anim@am_hold_up@male", "shoplift_high", 1.0)
|
||||
deleteRopeAndNozzleProp()
|
||||
|
||||
if Config.ReturnNozzleRefund then
|
||||
local isElectric = Utils.Table.contains({"electricnormal", "electricfast"}, currentFuelTypePurchased)
|
||||
TriggerServerEvent('lc_fuel:returnNozzle', remainingFuelToRefuel, isElectric)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function executeRefuelAction(isFromJerryCan, closestVehicle, closestCapPos, closestVehicleHash, customVehicleParameters)
|
||||
if Config.Debug then print("executeRefuelAction:p", isFromJerryCan, closestVehicle, closestCapPos, closestVehicleHash, customVehicleParameters) end
|
||||
local ped = PlayerPedId()
|
||||
local refuelTick = Config.RefuelTick
|
||||
local isElectric = false
|
||||
local fuelTypePurchased = currentFuelTypePurchased
|
||||
|
||||
-- Change the fuel tick if its electric charging
|
||||
if fuelTypePurchased == "electricfast" then
|
||||
isElectric = true
|
||||
refuelTick = Config.Electric.chargeTypes.fast.time * 1000 / 2 -- Divide by 2 because each tick adds 0.5kWh.
|
||||
end
|
||||
if fuelTypePurchased == "electricnormal" then
|
||||
isElectric = true
|
||||
refuelTick = Config.Electric.chargeTypes.normal.time * 1000 / 2
|
||||
end
|
||||
|
||||
local animationDuration = 1000 -- 1 sec
|
||||
if isFromJerryCan then
|
||||
animationDuration = -1 -- (infinite) Do not allow the player walk during refuel from jerry can
|
||||
end
|
||||
|
||||
-- Do not allow user mix electric and petrol fuel/vehicles
|
||||
if (isElectric and Config.Electric.vehiclesListHash[closestVehicleHash]) or (not isElectric and not Config.Electric.vehiclesListHash[closestVehicleHash]) then
|
||||
if not isRefuelling and not vehicleAttachedToNozzle then
|
||||
if remainingFuelToRefuel > 0 then
|
||||
-- Reset the vehicle fuel to 0 when refueling with a different fuel type
|
||||
if not isFromJerryCan and not isElectric then
|
||||
local fuelType = getVehicleFuelTypeFromServer(closestVehicle)
|
||||
if fuelTypePurchased ~= fuelType then
|
||||
changeVehicleFuelType(closestVehicle, fuelTypePurchased)
|
||||
end
|
||||
end
|
||||
isRefuelling = true
|
||||
|
||||
-- Animate the ped
|
||||
TaskTurnPedToFaceCoord(ped, closestCapPos.x, closestCapPos.y, closestCapPos.z, animationDuration)
|
||||
Utils.Animations.loadAnimDict("weapons@misc@jerrycan@")
|
||||
TaskPlayAnim(ped, "weapons@misc@jerrycan@", "fire", 2.0, 8.0, animationDuration, 50, 0, false, false, false)
|
||||
|
||||
-- Plug the nozzle in the car
|
||||
attachNozzleToVehicle(closestVehicle, customVehicleParameters)
|
||||
|
||||
-- Refuel the vehicle
|
||||
refuelingThread = CreateThread(function()
|
||||
local vehicleToRefuel = closestVehicle
|
||||
local startingFuel = GetFuel(vehicleToRefuel) -- Get vehicle fuel level
|
||||
local vehicleTankSize = getVehicleTankSize(vehicleToRefuel)
|
||||
|
||||
local currentFuel = startingFuel
|
||||
-- Loop keep happening while the player has not canceled, while the fuelNozzle exists and while the ped still has jerry can in hands
|
||||
while isRefuelling and (DoesEntityExist(fuelNozzle) or (isFromJerryCan and GetSelectedPedWeapon(ped) == JERRY_CAN_HASH)) do
|
||||
currentFuel = GetFuel(vehicleToRefuel)
|
||||
local percentageOfFuelToAdd = calculateFuelToAddPercentage(vehicleTankSize) -- Add 0.5L each tick, but the % is proportional to the vehicle tank
|
||||
if currentFuel + percentageOfFuelToAdd > 100 then
|
||||
-- Increase the vehicle fuel level
|
||||
percentageOfFuelToAdd = 100 - currentFuel
|
||||
end
|
||||
if remainingFuelToRefuel < litersDeductedEachTick then
|
||||
-- Break when the user has used all the fuel he paid for
|
||||
break
|
||||
end
|
||||
if percentageOfFuelToAdd <= 0.01 then
|
||||
-- Break when the vehicle tank is full
|
||||
exports['lc_utils']:notify("info", Utils.translate("vehicle_tank_full"))
|
||||
break
|
||||
end
|
||||
-- Decrease the purchased fuel amount and increase the vehicle fuel level
|
||||
remainingFuelToRefuel = remainingFuelToRefuel - litersDeductedEachTick
|
||||
currentFuel = currentFuel + percentageOfFuelToAdd
|
||||
SetFuel(vehicleToRefuel, currentFuel)
|
||||
SendNUIMessage({
|
||||
showRefuelDisplay = true,
|
||||
remainingFuelAmount = remainingFuelToRefuel,
|
||||
currentVehicleTankSize = vehicleTankSize,
|
||||
currentDisplayFuelAmount = getVehicleDisplayFuelAmount(currentFuel, vehicleTankSize),
|
||||
isElectric = isElectric,
|
||||
fuelTypePurchased = fuelTypePurchased
|
||||
})
|
||||
if Config.Debug then print("executeRefuelAction:remainingFuelToRefuel", remainingFuelToRefuel) end
|
||||
Wait(refuelTick)
|
||||
end
|
||||
if isFromJerryCan then
|
||||
-- Update the jerry can ammo
|
||||
SetPedAmmo(ped, JERRY_CAN_HASH, remainingFuelToRefuel)
|
||||
updateWeaponAmmo(remainingFuelToRefuel)
|
||||
vehicleAttachedToNozzle = nil
|
||||
end
|
||||
if isElectric then
|
||||
exports['lc_utils']:notify("success", Utils.translate("vehicle_recharged"):format(Utils.Math.round(getVehicleDisplayFuelAmount(currentFuel, vehicleTankSize) - getVehicleDisplayFuelAmount(startingFuel, vehicleTankSize), 1)))
|
||||
else
|
||||
exports['lc_utils']:notify("success", Utils.translate("vehicle_refueled"):format(Utils.Math.round(getVehicleDisplayFuelAmount(currentFuel, vehicleTankSize) - getVehicleDisplayFuelAmount(startingFuel, vehicleTankSize), 1)))
|
||||
end
|
||||
|
||||
-- Stop refuelling
|
||||
stopRefuelAnimation()
|
||||
SendNUIMessage({ hideRefuelDisplay = true })
|
||||
isRefuelling = false
|
||||
end)
|
||||
else
|
||||
exports['lc_utils']:notify("error", Utils.translate("not_enough_refuel"))
|
||||
end
|
||||
else
|
||||
-- Terminate refuelling
|
||||
stopRefuelAction()
|
||||
-- Cooldown to prevent the user to spam E and glitch things
|
||||
inCooldown = true
|
||||
SetTimeout(refuelTick + 1,function()
|
||||
inCooldown = false
|
||||
end)
|
||||
end
|
||||
else
|
||||
exports['lc_utils']:notify("error", Utils.translate("incompatible_fuel"))
|
||||
end
|
||||
end
|
||||
|
||||
function calculateFuelToAddPercentage(totalVolumeLiters)
|
||||
local percentage = (litersDeductedEachTick / totalVolumeLiters) * 100
|
||||
return percentage
|
||||
end
|
||||
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- Markers
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
function refuelLoop(isFromJerryCan)
|
||||
-- Load variables to open te UI
|
||||
loadNuiVariables()
|
||||
|
||||
local ped = PlayerPedId()
|
||||
local closestCapPos
|
||||
local closestVehicle
|
||||
local customVehicleParameters
|
||||
local closestVehicleHash
|
||||
|
||||
if isFromJerryCan then
|
||||
remainingFuelToRefuel = getJerryCanAmmo()
|
||||
end
|
||||
|
||||
isRefuelling = false
|
||||
while DoesEntityExist(fuelNozzle) or (isFromJerryCan and GetSelectedPedWeapon(ped) == JERRY_CAN_HASH) do
|
||||
local waitTime = 200
|
||||
if closestCapPos then
|
||||
distanceToCap = #(GetEntityCoords(ped) - vector3(closestCapPos.x,closestCapPos.y,closestCapPos.z + customVehicleParameters.nozzleOffset.up + 0.0))
|
||||
if distanceToCap < customVehicleParameters.distance + 0.0 and (not vehicleAttachedToNozzle or (vehicleAttachedToNozzle and DoesEntityExist(vehicleAttachedToNozzle) and vehicleAttachedToNozzle == closestVehicle)) then
|
||||
waitTime = 1
|
||||
Utils.Markers.drawText3D(closestCapPos.x,closestCapPos.y,closestCapPos.z + customVehicleParameters.nozzleOffset.up + 0.0, cachedTranslations.interact_with_vehicle)
|
||||
if IsControlJustPressed(0, 38) and not inCooldown then
|
||||
-- See which one the player is nearer. The fuel cap or fuel pump
|
||||
if distanceToPump >= distanceToCap then
|
||||
executeRefuelAction(isFromJerryCan, closestVehicle, closestCapPos, closestVehicleHash, customVehicleParameters)
|
||||
end
|
||||
end
|
||||
else
|
||||
-- Player is not near the cap, set it to null to find it again later
|
||||
closestCapPos = nil
|
||||
end
|
||||
else
|
||||
-- Find the nearest vehicle and cap pos
|
||||
closestVehicle, closestCapPos, closestVehicleHash, customVehicleParameters = getClosestVehicleVariables()
|
||||
end
|
||||
Wait(waitTime)
|
||||
end
|
||||
|
||||
terminateRefuelThread()
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- Target
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
function createTargetForVehicleIteraction()
|
||||
local attachParams = {
|
||||
labelText = Utils.translate("target.start_refuel"),
|
||||
icon = "fas fa-gas-pump",
|
||||
iconColor = "#2986cc",
|
||||
zone_id = "start_refuel",
|
||||
distance = 2.0
|
||||
}
|
||||
|
||||
Utils.Target.createTargetForBone(vehicleCapBoneList(),attachParams,executeRefuelActionFromTarget,nil,canAttachNozzleTargetCallback)
|
||||
|
||||
local detachParams = {
|
||||
labelText = Utils.translate("target.stop_refuel"),
|
||||
icon = "fas fa-gas-pump",
|
||||
iconColor = "#2986cc",
|
||||
zone_id = "stop_refuel",
|
||||
distance = 2.0
|
||||
}
|
||||
Utils.Target.createTargetForBone(vehicleCapBoneList(),detachParams,stopRefuelAction,nil,canDetachNozzleTargetCallback)
|
||||
end
|
||||
|
||||
function executeRefuelActionFromTarget()
|
||||
-- Load variables to open te UI
|
||||
loadNuiVariables()
|
||||
|
||||
local ped = PlayerPedId()
|
||||
|
||||
-- Calculate if player is holding a jerry can
|
||||
local isFromJerryCan = false
|
||||
if not IsPedInAnyVehicle(ped, false) and GetSelectedPedWeapon(ped) == JERRY_CAN_HASH then
|
||||
isFromJerryCan = true
|
||||
remainingFuelToRefuel = getJerryCanAmmo()
|
||||
if Config.Debug then print("executeRefuelActionFromTarget:remainingFuelToRefuel",remainingFuelToRefuel) end
|
||||
end
|
||||
|
||||
local closestVehicle, closestCapPos, closestVehicleHash, customVehicleParameters = getClosestVehicleVariables()
|
||||
executeRefuelAction(isFromJerryCan, closestVehicle, closestCapPos, closestVehicleHash, customVehicleParameters)
|
||||
end
|
||||
|
||||
function canAttachNozzleTargetCallback(entity, distance)
|
||||
local ped = PlayerPedId()
|
||||
if (DoesEntityExist(fuelNozzle) or GetSelectedPedWeapon(ped) == JERRY_CAN_HASH)
|
||||
and not isRefuelling
|
||||
and not vehicleAttachedToNozzle then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function canDetachNozzleTargetCallback(entity, distance)
|
||||
local ped = PlayerPedId()
|
||||
if (DoesEntityExist(fuelNozzle) or GetSelectedPedWeapon(ped) == JERRY_CAN_HASH)
|
||||
and vehicleAttachedToNozzle then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function canOpenPumpUiTargetCallback()
|
||||
return not DoesEntityExist(fuelNozzle)
|
||||
end
|
||||
|
||||
function canReturnNozzleTargetCallback()
|
||||
return DoesEntityExist(fuelNozzle)
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- Utils
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
function getClosestVehicleVariables()
|
||||
-- Get the closest vehicle and its cap pos
|
||||
local closestVehicle = GetClosestVehicle()
|
||||
local closestCapPos = GetVehicleCapPos(closestVehicle)
|
||||
local closestVehicleHash = GetEntityModel(closestVehicle)
|
||||
local customVehicleParameters = (Config.CustomVehicleParametersHash[closestVehicleHash] or Config.CustomVehicleParametersHash.default or { distance = 1.2, nozzleOffset = { forward = 0.0, right = -0.15, up = 0.5 }, nozzleRotation = { x = 0, y = 0, z = 0} })
|
||||
if not closestCapPos then
|
||||
print("Cap not found for vehicle")
|
||||
end
|
||||
return closestVehicle, closestCapPos, closestVehicleHash, customVehicleParameters
|
||||
end
|
||||
|
||||
function terminateRefuelThread()
|
||||
-- Stop the refueling process
|
||||
if refuelingThread and IsThreadActive(refuelingThread) then
|
||||
TerminateThread(refuelingThread)
|
||||
refuelingThread = nil
|
||||
end
|
||||
end
|
||||
|
||||
function stopRefuelAnimation()
|
||||
local ped = PlayerPedId()
|
||||
ClearPedTasks(ped)
|
||||
RemoveAnimDict("weapons@misc@jerrycan@")
|
||||
end
|
||||
|
||||
function stopRefuelAction()
|
||||
-- Stop refuelling
|
||||
stopRefuelAnimation()
|
||||
SendNUIMessage({ hideRefuelDisplay = true })
|
||||
attachNozzleToPed()
|
||||
isRefuelling = false
|
||||
end
|
||||
|
||||
function attachNozzleToVehicle(closestVehicle, customVehicleParameters)
|
||||
DetachEntity(fuelNozzle, true, true)
|
||||
|
||||
-- Find the appropriate bone for the fuel cap
|
||||
local tankBones = vehicleCapBoneList()
|
||||
local boneIndex = -1
|
||||
|
||||
for _, boneName in ipairs(tankBones) do
|
||||
boneIndex = GetEntityBoneIndexByName(closestVehicle, boneName)
|
||||
if boneIndex ~= -1 then
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
if boneIndex ~= -1 then
|
||||
local vehicleRotation = GetEntityRotation(closestVehicle)
|
||||
local forwardVector, rightVector, upVector, _ = GetEntityMatrix(closestVehicle)
|
||||
|
||||
-- Adjust the offsets
|
||||
local forwardOffset = forwardVector * customVehicleParameters.nozzleOffset.forward
|
||||
local rightoffset = rightVector * customVehicleParameters.nozzleOffset.right
|
||||
local upOffset = upVector * customVehicleParameters.nozzleOffset.up
|
||||
local finalOffset = forwardOffset + rightoffset + upOffset
|
||||
|
||||
-- Adjust the rotation
|
||||
local nozzleRotation = customVehicleParameters.nozzleRotation or { x = 0, y = 0, z = 0 }
|
||||
local finalRotationX = vehicleRotation.x + nozzleRotation.x
|
||||
local finalRotationY = vehicleRotation.y + nozzleRotation.y
|
||||
local finalRotationZ = vehicleRotation.z + nozzleRotation.z
|
||||
|
||||
-- Attach the nozzle to the vehicle's fuel cap bone with the calculated rotation
|
||||
AttachEntityToEntity(fuelNozzle, closestVehicle, boneIndex, finalOffset.x, finalOffset.y, finalOffset.z, finalRotationX - 45, finalRotationY, finalRotationZ - 90, false, false, false, false, 2, false)
|
||||
else
|
||||
print("No valid fuel cap bone found on the vehicle.")
|
||||
end
|
||||
|
||||
-- Set the global variable to indicate the vehicle attached to nozzle
|
||||
vehicleAttachedToNozzle = closestVehicle
|
||||
end
|
||||
|
||||
function attachNozzleToPed()
|
||||
DetachEntity(fuelNozzle, true, true)
|
||||
|
||||
local ped = PlayerPedId()
|
||||
local pedBone = GetPedBoneIndex(ped, 18905)
|
||||
AttachEntityToEntity(fuelNozzle, ped, pedBone, 0.13, 0.04, 0.01, -42.0, -115.0, -63.42, false, true, false, true, 0, true)
|
||||
|
||||
vehicleAttachedToNozzle = nil
|
||||
end
|
||||
|
||||
function getNearestPumpRopeLength(fuelTypePurchased, pumpCoords)
|
||||
local distanceToFindPump = 10
|
||||
local ropeLength = Config.DefaultRopeLength
|
||||
if fuelTypePurchased == "electricfast" or fuelTypePurchased == "electricnormal" then
|
||||
for _, pumpConfig in pairs(Config.Electric.chargersLocation) do
|
||||
local distance = #(vector3(pumpConfig.location.x, pumpConfig.location.y, pumpConfig.location.z) - pumpCoords)
|
||||
if distance < distanceToFindPump then
|
||||
ropeLength = pumpConfig.ropeLength
|
||||
break
|
||||
end
|
||||
end
|
||||
else
|
||||
for _, pumpConfig in pairs(Config.CustomGasPumpLocations) do
|
||||
local distance = #(vector3(pumpConfig.location.x, pumpConfig.location.y, pumpConfig.location.z) - pumpCoords)
|
||||
if distance < distanceToFindPump then
|
||||
ropeLength = pumpConfig.ropeLength
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
return ropeLength
|
||||
end
|
||||
|
||||
function createFuelNozzleObject(fuelTypePurchased)
|
||||
local nozzle_prop_label = Config.NozzleProps.gas
|
||||
-- Change the nozzle prop to electric
|
||||
if fuelTypePurchased == "electricfast" or fuelTypePurchased == "electricnormal" then
|
||||
nozzle_prop_label = Config.NozzleProps.electric
|
||||
end
|
||||
|
||||
RequestModel(nozzle_prop_label)
|
||||
while not HasModelLoaded(nozzle_prop_label) do
|
||||
Wait(50)
|
||||
end
|
||||
|
||||
return CreateObject(joaat(nozzle_prop_label), 1.0, 1.0, 1.0, true, true, false)
|
||||
local refuelingThread = nil
|
||||
local isRefuelling = false
|
||||
local inCooldown = false
|
||||
local vehicleAttachedToNozzle = nil
|
||||
local remainingFuelToRefuel = 0
|
||||
local currentFuelTypePurchased = nil
|
||||
local distanceToCap, distanceToPump = math.maxinteger, math.maxinteger
|
||||
local litersDeductedEachTick = 0.5
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- Refuelling
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
RegisterNetEvent('lc_fuel:getPumpNozzle')
|
||||
AddEventHandler('lc_fuel:getPumpNozzle', function(fuelAmountPurchased, fuelTypePurchased)
|
||||
closeUI()
|
||||
if DoesEntityExist(fuelNozzle) then return end
|
||||
if not currentPump then return end
|
||||
local ped = PlayerPedId()
|
||||
local pumpCoords = GetEntityCoords(currentPump)
|
||||
|
||||
-- Animate the ped to grab the nozzle
|
||||
Utils.Animations.loadAnimDict("anim@am_hold_up@male")
|
||||
TaskPlayAnim(ped, "anim@am_hold_up@male", "shoplift_high", 2.0, 8.0, -1, 50, 0, false, false, false)
|
||||
Wait(300)
|
||||
StopAnimTask(ped, "anim@am_hold_up@male", "shoplift_high", 1.0)
|
||||
|
||||
-- Spawn the nozzle
|
||||
fuelNozzle = createFuelNozzleObject(fuelTypePurchased)
|
||||
|
||||
-- Attach the nozzle
|
||||
attachNozzleToPed()
|
||||
if Config.EnablePumpRope then
|
||||
fuelRope = CreateRopeToPump(pumpCoords)
|
||||
end
|
||||
|
||||
-- Get the max distance the player can go with the nozzle
|
||||
local ropeLength = getNearestPumpRopeLength(fuelTypePurchased, pumpCoords)
|
||||
|
||||
-- Thread to handle fuel nozzle
|
||||
CreateThread(function()
|
||||
while DoesEntityExist(fuelNozzle) do
|
||||
local waitTime = 500
|
||||
local nozzleCoords = GetEntityCoords(fuelNozzle) -- Conside the nozzle position, not the ped
|
||||
distanceToPump = #(pumpCoords - nozzleCoords)
|
||||
-- If player reach the distance limit delete the nozzle
|
||||
if distanceToPump > ropeLength then
|
||||
exports['lc_utils']:notify("error", Utils.translate("too_far_away"))
|
||||
deleteRopeAndNozzleProp()
|
||||
end
|
||||
-- If player is near the distance limit, show a notification to him
|
||||
if distanceToPump > (ropeLength * 0.7) then
|
||||
Utils.Markers.showHelpNotification(Utils.translate("too_far_away"), true)
|
||||
end
|
||||
-- Check if ped entered a vehicle
|
||||
if IsPedSittingInAnyVehicle(ped) then
|
||||
-- Gives him 2 seconds to leave before clearing the nozzle
|
||||
SetTimeout(2000,function()
|
||||
if IsPedSittingInAnyVehicle(ped) and DoesEntityExist(fuelNozzle) then
|
||||
exports['lc_utils']:notify("error", Utils.translate("too_far_away"))
|
||||
deleteRopeAndNozzleProp()
|
||||
end
|
||||
end)
|
||||
end
|
||||
if Utils.Config.custom_scripts_compatibility.target == "disabled" and distanceToPump < 1.5 then
|
||||
waitTime = 2
|
||||
Utils.Markers.showHelpNotification(cachedTranslations.return_nozzle, true)
|
||||
if IsControlJustPressed(0,38) then
|
||||
-- See which one the player is nearer. The fuel cap or fuel pump
|
||||
if distanceToPump < distanceToCap then
|
||||
-- Avoid player press E to return nozzle and press E to refuel in same tick, so it gives preference to refuel
|
||||
Wait(100)
|
||||
returnNozzle()
|
||||
end
|
||||
end
|
||||
end
|
||||
Wait(waitTime)
|
||||
end
|
||||
-- Not near the pump anymore
|
||||
distanceToPump = math.maxinteger
|
||||
end)
|
||||
|
||||
-- Thread to refuel the vehicle
|
||||
CreateThread(function()
|
||||
-- Set the fuel purchased in a global variable
|
||||
remainingFuelToRefuel = fuelAmountPurchased
|
||||
-- Set the fuel type in a global variable
|
||||
currentFuelTypePurchased = fuelTypePurchased
|
||||
-- Trigger the function to allow refuel on markers
|
||||
if Utils.Config.custom_scripts_compatibility.target == "disabled" then
|
||||
refuelLoop(false)
|
||||
end
|
||||
-- Not near the fuel cap anymore
|
||||
distanceToCap = math.maxinteger
|
||||
end)
|
||||
end)
|
||||
|
||||
function returnNozzle()
|
||||
local ped = PlayerPedId()
|
||||
|
||||
if not isRefuelling then
|
||||
Utils.Animations.loadAnimDict("anim@am_hold_up@male")
|
||||
TaskPlayAnim(ped, "anim@am_hold_up@male", "shoplift_high", 2.0, 8.0, -1, 50, 0, false, false, false)
|
||||
Wait(300)
|
||||
StopAnimTask(ped, "anim@am_hold_up@male", "shoplift_high", 1.0)
|
||||
deleteRopeAndNozzleProp()
|
||||
|
||||
if Config.ReturnNozzleRefund then
|
||||
local isElectric = Utils.Table.contains({"electricnormal", "electricfast"}, currentFuelTypePurchased)
|
||||
TriggerServerEvent('lc_fuel:returnNozzle', remainingFuelToRefuel, isElectric)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function executeRefuelAction(isFromJerryCan, closestVehicle, closestCapPos, closestVehicleHash, customVehicleParameters)
|
||||
if Config.Debug then print("executeRefuelAction:p", isFromJerryCan, closestVehicle, closestCapPos, closestVehicleHash, customVehicleParameters) end
|
||||
local ped = PlayerPedId()
|
||||
local refuelTick = Config.RefuelTick
|
||||
local isElectric = false
|
||||
local fuelTypePurchased = currentFuelTypePurchased
|
||||
|
||||
-- Change the fuel tick if its electric charging
|
||||
if fuelTypePurchased == "electricfast" then
|
||||
isElectric = true
|
||||
refuelTick = Config.Electric.chargeTypes.fast.time * 1000 / 2 -- Divide by 2 because each tick adds 0.5kWh.
|
||||
end
|
||||
if fuelTypePurchased == "electricnormal" then
|
||||
isElectric = true
|
||||
refuelTick = Config.Electric.chargeTypes.normal.time * 1000 / 2
|
||||
end
|
||||
|
||||
local animationDuration = 1000 -- 1 sec
|
||||
if isFromJerryCan then
|
||||
animationDuration = -1 -- (infinite) Do not allow the player walk during refuel from jerry can
|
||||
end
|
||||
|
||||
-- Do not allow user mix electric and petrol fuel/vehicles
|
||||
if (isElectric and Config.Electric.vehiclesListHash[closestVehicleHash]) or (not isElectric and not Config.Electric.vehiclesListHash[closestVehicleHash]) then
|
||||
if not isRefuelling and not vehicleAttachedToNozzle then
|
||||
if remainingFuelToRefuel > 0 then
|
||||
-- Reset the vehicle fuel to 0 when refueling with a different fuel type
|
||||
if not isFromJerryCan and not isElectric then
|
||||
local fuelType = getVehicleFuelTypeFromServer(closestVehicle)
|
||||
if fuelTypePurchased ~= fuelType then
|
||||
changeVehicleFuelType(closestVehicle, fuelTypePurchased)
|
||||
end
|
||||
end
|
||||
isRefuelling = true
|
||||
|
||||
-- Animate the ped
|
||||
TaskTurnPedToFaceCoord(ped, closestCapPos.x, closestCapPos.y, closestCapPos.z, animationDuration)
|
||||
Utils.Animations.loadAnimDict("weapons@misc@jerrycan@")
|
||||
TaskPlayAnim(ped, "weapons@misc@jerrycan@", "fire", 2.0, 8.0, animationDuration, 50, 0, false, false, false)
|
||||
|
||||
-- Plug the nozzle in the car
|
||||
attachNozzleToVehicle(closestVehicle, customVehicleParameters)
|
||||
|
||||
-- Refuel the vehicle
|
||||
refuelingThread = CreateThread(function()
|
||||
local vehicleToRefuel = closestVehicle
|
||||
local startingFuel = GetFuel(vehicleToRefuel) -- Get vehicle fuel level
|
||||
local vehicleTankSize = getVehicleTankSize(vehicleToRefuel)
|
||||
|
||||
local currentFuel = startingFuel
|
||||
-- Loop keep happening while the player has not canceled, while the fuelNozzle exists and while the ped still has jerry can in hands
|
||||
while isRefuelling and (DoesEntityExist(fuelNozzle) or (isFromJerryCan and GetSelectedPedWeapon(ped) == JERRY_CAN_HASH)) do
|
||||
currentFuel = GetFuel(vehicleToRefuel)
|
||||
local percentageOfFuelToAdd = calculateFuelToAddPercentage(vehicleTankSize) -- Add 0.5L each tick, but the % is proportional to the vehicle tank
|
||||
if currentFuel + percentageOfFuelToAdd > 100 then
|
||||
-- Increase the vehicle fuel level
|
||||
percentageOfFuelToAdd = 100 - currentFuel
|
||||
end
|
||||
if remainingFuelToRefuel < litersDeductedEachTick then
|
||||
-- Break when the user has used all the fuel he paid for
|
||||
break
|
||||
end
|
||||
if percentageOfFuelToAdd <= 0.01 then
|
||||
-- Break when the vehicle tank is full
|
||||
exports['lc_utils']:notify("info", Utils.translate("vehicle_tank_full"))
|
||||
break
|
||||
end
|
||||
-- Decrease the purchased fuel amount and increase the vehicle fuel level
|
||||
remainingFuelToRefuel = remainingFuelToRefuel - litersDeductedEachTick
|
||||
currentFuel = currentFuel + percentageOfFuelToAdd
|
||||
SetFuel(vehicleToRefuel, currentFuel)
|
||||
SendNUIMessage({
|
||||
showRefuelDisplay = true,
|
||||
remainingFuelAmount = remainingFuelToRefuel,
|
||||
currentVehicleTankSize = vehicleTankSize,
|
||||
currentDisplayFuelAmount = getVehicleDisplayFuelAmount(currentFuel, vehicleTankSize),
|
||||
isElectric = isElectric,
|
||||
fuelTypePurchased = fuelTypePurchased
|
||||
})
|
||||
if Config.Debug then print("executeRefuelAction:remainingFuelToRefuel", remainingFuelToRefuel) end
|
||||
Wait(refuelTick)
|
||||
end
|
||||
if isFromJerryCan then
|
||||
-- Update the jerry can ammo
|
||||
SetPedAmmo(ped, JERRY_CAN_HASH, remainingFuelToRefuel)
|
||||
updateWeaponAmmo(remainingFuelToRefuel)
|
||||
vehicleAttachedToNozzle = nil
|
||||
end
|
||||
if isElectric then
|
||||
exports['lc_utils']:notify("success", Utils.translate("vehicle_recharged"):format(Utils.Math.round(getVehicleDisplayFuelAmount(currentFuel, vehicleTankSize) - getVehicleDisplayFuelAmount(startingFuel, vehicleTankSize), 1)))
|
||||
else
|
||||
exports['lc_utils']:notify("success", Utils.translate("vehicle_refueled"):format(Utils.Math.round(getVehicleDisplayFuelAmount(currentFuel, vehicleTankSize) - getVehicleDisplayFuelAmount(startingFuel, vehicleTankSize), 1)))
|
||||
end
|
||||
|
||||
-- Stop refuelling
|
||||
stopRefuelAnimation()
|
||||
SendNUIMessage({ hideRefuelDisplay = true })
|
||||
isRefuelling = false
|
||||
end)
|
||||
else
|
||||
exports['lc_utils']:notify("error", Utils.translate("not_enough_refuel"))
|
||||
end
|
||||
else
|
||||
-- Terminate refuelling
|
||||
stopRefuelAction()
|
||||
-- Cooldown to prevent the user to spam E and glitch things
|
||||
inCooldown = true
|
||||
SetTimeout(refuelTick + 1,function()
|
||||
inCooldown = false
|
||||
end)
|
||||
end
|
||||
else
|
||||
exports['lc_utils']:notify("error", Utils.translate("incompatible_fuel"))
|
||||
end
|
||||
end
|
||||
|
||||
function calculateFuelToAddPercentage(totalVolumeLiters)
|
||||
local percentage = (litersDeductedEachTick / totalVolumeLiters) * 100
|
||||
return percentage
|
||||
end
|
||||
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- Markers
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
function refuelLoop(isFromJerryCan)
|
||||
-- Load variables to open te UI
|
||||
loadNuiVariables()
|
||||
|
||||
local ped = PlayerPedId()
|
||||
local closestCapPos
|
||||
local closestVehicle
|
||||
local customVehicleParameters
|
||||
local closestVehicleHash
|
||||
|
||||
if isFromJerryCan then
|
||||
remainingFuelToRefuel = getJerryCanAmmo()
|
||||
end
|
||||
|
||||
isRefuelling = false
|
||||
while DoesEntityExist(fuelNozzle) or (isFromJerryCan and GetSelectedPedWeapon(ped) == JERRY_CAN_HASH) do
|
||||
local waitTime = 200
|
||||
if closestCapPos then
|
||||
distanceToCap = #(GetEntityCoords(ped) - vector3(closestCapPos.x,closestCapPos.y,closestCapPos.z))
|
||||
if distanceToCap < customVehicleParameters.distance + 0.0 and (not vehicleAttachedToNozzle or (vehicleAttachedToNozzle and DoesEntityExist(vehicleAttachedToNozzle) and vehicleAttachedToNozzle == closestVehicle)) then
|
||||
waitTime = 1
|
||||
Utils.Markers.drawText3D(closestCapPos.x,closestCapPos.y,closestCapPos.z, cachedTranslations.interact_with_vehicle)
|
||||
if IsControlJustPressed(0, 38) and not inCooldown then
|
||||
-- See which one the player is nearer. The fuel cap or fuel pump
|
||||
if distanceToPump >= distanceToCap then
|
||||
executeRefuelAction(isFromJerryCan, closestVehicle, closestCapPos, closestVehicleHash, customVehicleParameters)
|
||||
end
|
||||
end
|
||||
else
|
||||
-- Player is not near the cap, set it to null to find it again later
|
||||
closestCapPos = nil
|
||||
end
|
||||
else
|
||||
-- Find the nearest vehicle and cap pos
|
||||
closestVehicle, closestCapPos, closestVehicleHash, customVehicleParameters = getClosestVehicleVariables()
|
||||
end
|
||||
Wait(waitTime)
|
||||
end
|
||||
|
||||
terminateRefuelThread()
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- Target
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
function createTargetForVehicleIteraction()
|
||||
local attachParams = {
|
||||
labelText = Utils.translate("target.start_refuel"),
|
||||
icon = "fas fa-gas-pump",
|
||||
iconColor = "#2986cc",
|
||||
zone_id = "start_refuel",
|
||||
distance = 2.0
|
||||
}
|
||||
|
||||
Utils.Target.createTargetForBone(vehicleCapBoneList(),attachParams,executeRefuelActionFromTarget,nil,canAttachNozzleTargetCallback)
|
||||
|
||||
local detachParams = {
|
||||
labelText = Utils.translate("target.stop_refuel"),
|
||||
icon = "fas fa-gas-pump",
|
||||
iconColor = "#2986cc",
|
||||
zone_id = "stop_refuel",
|
||||
distance = 2.0
|
||||
}
|
||||
Utils.Target.createTargetForBone(vehicleCapBoneList(),detachParams,stopRefuelAction,nil,canDetachNozzleTargetCallback)
|
||||
end
|
||||
|
||||
function executeRefuelActionFromTarget()
|
||||
-- Load variables to open te UI
|
||||
loadNuiVariables()
|
||||
|
||||
local ped = PlayerPedId()
|
||||
|
||||
-- Calculate if player is holding a jerry can
|
||||
local isFromJerryCan = false
|
||||
if not IsPedInAnyVehicle(ped, false) and GetSelectedPedWeapon(ped) == JERRY_CAN_HASH then
|
||||
isFromJerryCan = true
|
||||
remainingFuelToRefuel = getJerryCanAmmo()
|
||||
if Config.Debug then print("executeRefuelActionFromTarget:remainingFuelToRefuel",remainingFuelToRefuel) end
|
||||
end
|
||||
|
||||
local closestVehicle, closestCapPos, closestVehicleHash, customVehicleParameters = getClosestVehicleVariables()
|
||||
executeRefuelAction(isFromJerryCan, closestVehicle, closestCapPos, closestVehicleHash, customVehicleParameters)
|
||||
end
|
||||
|
||||
function canAttachNozzleTargetCallback(entity, distance)
|
||||
local ped = PlayerPedId()
|
||||
if (DoesEntityExist(fuelNozzle) or GetSelectedPedWeapon(ped) == JERRY_CAN_HASH)
|
||||
and not isRefuelling
|
||||
and not vehicleAttachedToNozzle then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function canDetachNozzleTargetCallback(entity, distance)
|
||||
local ped = PlayerPedId()
|
||||
if (DoesEntityExist(fuelNozzle) or GetSelectedPedWeapon(ped) == JERRY_CAN_HASH)
|
||||
and vehicleAttachedToNozzle then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function canOpenPumpUiTargetCallback()
|
||||
return not DoesEntityExist(fuelNozzle)
|
||||
end
|
||||
|
||||
function canReturnNozzleTargetCallback()
|
||||
return DoesEntityExist(fuelNozzle)
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- Utils
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
function getClosestVehicleVariables()
|
||||
-- Get the closest vehicle and its cap pos
|
||||
local closestVehicle = GetClosestVehicle()
|
||||
local closestCapPos = GetVehicleCapPos(closestVehicle)
|
||||
local closestVehicleHash = GetEntityModel(closestVehicle)
|
||||
local customVehicleParameters = (Config.CustomVehicleParametersHash[closestVehicleHash] or Config.CustomVehicleParametersHash.default or { distance = 1.2, nozzleOffset = { forward = 0.0, right = -0.15, up = 0.5 }, nozzleRotation = { x = 0, y = 0, z = 0} })
|
||||
if not closestCapPos then
|
||||
print("Cap not found for vehicle")
|
||||
end
|
||||
|
||||
local finalWorldPos = getWorldPosFromOffset(closestVehicle, customVehicleParameters.nozzleOffset)
|
||||
|
||||
return closestVehicle, finalWorldPos, closestVehicleHash, customVehicleParameters
|
||||
end
|
||||
|
||||
function getWorldPosFromOffset(vehicle, offset)
|
||||
local closestCapPos = GetVehicleCapPos(vehicle)
|
||||
local forwardVector, rightVector, upVector, _ = GetEntityMatrix(vehicle)
|
||||
|
||||
-- Adjust the offsets
|
||||
local forwardOffset = forwardVector * offset.forward
|
||||
local rightoffset = rightVector * offset.right
|
||||
local upOffset = upVector * offset.up
|
||||
|
||||
-- Final world position of the nozzle point
|
||||
return vector3(
|
||||
closestCapPos.x + forwardOffset.x + rightoffset.x + upOffset.x,
|
||||
closestCapPos.y + forwardOffset.y + rightoffset.y + upOffset.y,
|
||||
closestCapPos.z + forwardOffset.z + rightoffset.z + upOffset.z
|
||||
)
|
||||
end
|
||||
|
||||
function terminateRefuelThread()
|
||||
-- Stop the refueling process
|
||||
if refuelingThread and IsThreadActive(refuelingThread) then
|
||||
TerminateThread(refuelingThread)
|
||||
refuelingThread = nil
|
||||
end
|
||||
end
|
||||
|
||||
function stopRefuelAnimation()
|
||||
local ped = PlayerPedId()
|
||||
ClearPedTasks(ped)
|
||||
RemoveAnimDict("weapons@misc@jerrycan@")
|
||||
end
|
||||
|
||||
function stopRefuelAction()
|
||||
-- Stop refuelling
|
||||
stopRefuelAnimation()
|
||||
SendNUIMessage({ hideRefuelDisplay = true })
|
||||
attachNozzleToPed()
|
||||
isRefuelling = false
|
||||
end
|
||||
|
||||
function attachNozzleToVehicle(closestVehicle, customVehicleParameters)
|
||||
DetachEntity(fuelNozzle, true, true)
|
||||
|
||||
-- Find the appropriate bone for the fuel cap
|
||||
local tankBones = vehicleCapBoneList()
|
||||
local boneIndex = -1
|
||||
|
||||
for _, boneName in ipairs(tankBones) do
|
||||
boneIndex = GetEntityBoneIndexByName(closestVehicle, boneName)
|
||||
if boneIndex ~= -1 then
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
if boneIndex ~= -1 then
|
||||
local vehicleRotation = GetEntityRotation(closestVehicle)
|
||||
local forwardVector, rightVector, upVector, _ = GetEntityMatrix(closestVehicle)
|
||||
|
||||
-- Adjust the offsets
|
||||
local forwardOffset = forwardVector * customVehicleParameters.nozzleOffset.forward
|
||||
local rightoffset = rightVector * customVehicleParameters.nozzleOffset.right
|
||||
local upOffset = upVector * customVehicleParameters.nozzleOffset.up
|
||||
local finalOffset = forwardOffset + rightoffset + upOffset
|
||||
|
||||
-- Adjust the rotation
|
||||
local nozzleRotation = customVehicleParameters.nozzleRotation or { x = 0, y = 0, z = 0 }
|
||||
local finalRotationX = vehicleRotation.x + nozzleRotation.x
|
||||
local finalRotationY = vehicleRotation.y + nozzleRotation.y
|
||||
local finalRotationZ = vehicleRotation.z + nozzleRotation.z
|
||||
|
||||
-- Attach the nozzle to the vehicle's fuel cap bone with the calculated rotation
|
||||
AttachEntityToEntity(fuelNozzle, closestVehicle, boneIndex, finalOffset.x, finalOffset.y, finalOffset.z, finalRotationX - 45, finalRotationY, finalRotationZ - 90, false, false, false, false, 2, false)
|
||||
else
|
||||
print("No valid fuel cap bone found on the vehicle.")
|
||||
end
|
||||
|
||||
-- Set the global variable to indicate the vehicle attached to nozzle
|
||||
vehicleAttachedToNozzle = closestVehicle
|
||||
end
|
||||
|
||||
function attachNozzleToPed()
|
||||
DetachEntity(fuelNozzle, true, true)
|
||||
|
||||
local ped = PlayerPedId()
|
||||
local pedBone = GetPedBoneIndex(ped, 18905)
|
||||
AttachEntityToEntity(fuelNozzle, ped, pedBone, 0.13, 0.04, 0.01, -42.0, -115.0, -63.42, false, true, false, true, 0, true)
|
||||
|
||||
vehicleAttachedToNozzle = nil
|
||||
end
|
||||
|
||||
function getNearestPumpRopeLength(fuelTypePurchased, pumpCoords)
|
||||
local distanceToFindPump = 10
|
||||
local ropeLength = Config.DefaultRopeLength
|
||||
if fuelTypePurchased == "electricfast" or fuelTypePurchased == "electricnormal" then
|
||||
for _, pumpConfig in pairs(Config.Electric.chargersLocation) do
|
||||
local distance = #(vector3(pumpConfig.location.x, pumpConfig.location.y, pumpConfig.location.z) - pumpCoords)
|
||||
if distance < distanceToFindPump then
|
||||
ropeLength = pumpConfig.ropeLength
|
||||
break
|
||||
end
|
||||
end
|
||||
else
|
||||
for _, pumpConfig in pairs(Config.CustomGasPumpLocations) do
|
||||
local distance = #(vector3(pumpConfig.location.x, pumpConfig.location.y, pumpConfig.location.z) - pumpCoords)
|
||||
if distance < distanceToFindPump then
|
||||
ropeLength = pumpConfig.ropeLength
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
return ropeLength
|
||||
end
|
||||
|
||||
function createFuelNozzleObject(fuelTypePurchased)
|
||||
local nozzle_prop_label = Config.NozzleProps.gas
|
||||
-- Change the nozzle prop to electric
|
||||
if fuelTypePurchased == "electricfast" or fuelTypePurchased == "electricnormal" then
|
||||
nozzle_prop_label = Config.NozzleProps.electric
|
||||
end
|
||||
|
||||
RequestModel(nozzle_prop_label)
|
||||
while not HasModelLoaded(nozzle_prop_label) do
|
||||
Wait(50)
|
||||
end
|
||||
|
||||
return CreateObject(joaat(nozzle_prop_label), 1.0, 1.0, 1.0, true, true, false)
|
||||
end
|
|
@ -1,48 +1,49 @@
|
|||
fx_version 'cerulean'
|
||||
game 'gta5'
|
||||
author 'LixeiroCharmoso'
|
||||
name 'lc_fuel'
|
||||
|
||||
ui_page "nui/ui.html"
|
||||
|
||||
lua54 'yes'
|
||||
|
||||
escrow_ignore {
|
||||
'**'
|
||||
}
|
||||
|
||||
client_scripts {
|
||||
"client/client.lua",
|
||||
"client/client_gas.lua",
|
||||
"client/client_electric.lua",
|
||||
"client/client_refuel.lua",
|
||||
"client/client_fuel_chart.lua",
|
||||
}
|
||||
|
||||
server_scripts {
|
||||
"@mysql-async/lib/MySQL.lua",
|
||||
"server/server.lua",
|
||||
}
|
||||
|
||||
shared_scripts {
|
||||
"lang/*.lua",
|
||||
"config.lua",
|
||||
"@lc_utils/functions/loader.lua",
|
||||
}
|
||||
|
||||
files {
|
||||
"version",
|
||||
"nui/lang/*",
|
||||
"nui/ui.html",
|
||||
"nui/panel.js",
|
||||
"nui/scripts/*",
|
||||
"nui/css/*",
|
||||
"nui/images/*",
|
||||
"nui/fonts/Technology.woff",
|
||||
}
|
||||
|
||||
dependency "lc_utils"
|
||||
provides 'LegacyFuel'
|
||||
|
||||
data_file 'DLC_ITYP_REQUEST' 'stream/prop_electric_01.ytyp'
|
||||
fx_version 'cerulean'
|
||||
game 'gta5'
|
||||
author 'LixeiroCharmoso'
|
||||
name 'lc_fuel'
|
||||
|
||||
ui_page "nui/ui.html"
|
||||
|
||||
lua54 'yes'
|
||||
|
||||
escrow_ignore {
|
||||
'**'
|
||||
}
|
||||
|
||||
client_scripts {
|
||||
"client/client.lua",
|
||||
"client/client_gas.lua",
|
||||
"client/client_electric.lua",
|
||||
"client/client_refuel.lua",
|
||||
"client/client_fuel_chart.lua",
|
||||
"client/client_fuel_type.lua",
|
||||
}
|
||||
|
||||
server_scripts {
|
||||
"@mysql-async/lib/MySQL.lua",
|
||||
"server/server.lua",
|
||||
}
|
||||
|
||||
shared_scripts {
|
||||
"lang/*.lua",
|
||||
"config.lua",
|
||||
"@lc_utils/functions/loader.lua",
|
||||
}
|
||||
|
||||
files {
|
||||
"version",
|
||||
"nui/lang/*",
|
||||
"nui/ui.html",
|
||||
"nui/panel.js",
|
||||
"nui/scripts/*",
|
||||
"nui/css/*",
|
||||
"nui/images/*",
|
||||
"nui/fonts/Technology.woff",
|
||||
}
|
||||
|
||||
dependency "lc_utils"
|
||||
provides 'LegacyFuel'
|
||||
|
||||
data_file 'DLC_ITYP_REQUEST' 'stream/prop_electric_01.ytyp'
|
||||
data_file 'DLC_ITYP_REQUEST' 'stream/prop_eletricpistol.ytyp'
|
|
@ -1,41 +1,49 @@
|
|||
if not Lang then Lang = {} end
|
||||
Lang['de'] = {
|
||||
['markers'] = {
|
||||
['open_refuel'] = "Drücke ~INPUT_CONTEXT~, um zu tanken",
|
||||
['open_recharge'] = "Drücke ~INPUT_CONTEXT~, um aufzuladen",
|
||||
['interact_with_vehicle'] = "Drücke ~y~E~w~, um zu interagieren",
|
||||
['return_nozzle'] = "Drücke ~INPUT_CONTEXT~, um die Zapfpistole zurückzugeben",
|
||||
},
|
||||
['target'] = {
|
||||
['open_refuel'] = "Tankmenü öffnen",
|
||||
['open_recharge'] = "Lademenü öffnen",
|
||||
['start_refuel'] = "Fahrzeug betanken",
|
||||
['stop_refuel'] = "Tanken beenden",
|
||||
['return_nozzle'] = "Zapfpistole zurückgeben",
|
||||
},
|
||||
['blip_text'] = "Tankstelle",
|
||||
['not_enough_refuel'] = "Sie haben den gesamten bezahlten Kraftstoff bereits verbraucht. Bitte kaufen Sie bei Bedarf zusätzlichen Treibstoff",
|
||||
['invalid_value'] = "Ungültiger Wert",
|
||||
['not_enough_money'] = "Du hast nicht genug $%s geld um das zu Bezahlen",
|
||||
['not_enough_stock'] = "Diese Tankstelle verfügt nicht über genügend Lagerbestände, um diese Aktion durchzuführen",
|
||||
['refuel_paid'] = "$%s bezahlt zum Tanken",
|
||||
['returned_fuel'] = "Du hast %sL Kraftstoff zurückgegeben und $%s zurückerhalten",
|
||||
['returned_charge'] = "Du hast %skWh Ladung zurückgegeben und $%s zurückerhalten",
|
||||
['jerry_can_paid'] = "$%s bezahlt für den Kanister",
|
||||
['too_far_away'] = "Sie sind zu weit von der Zapfseule entfernt",
|
||||
['vehicle_refueled'] = "Sie haben %sL ins Fahrzeug getankt",
|
||||
['vehicle_recharged'] = "Sie haben %skWh im Fahrzeug aufgeladen",
|
||||
['vehicle_tank_full'] = "Auto ist voll getankt",
|
||||
['vehicle_tank_emptied'] = "Fahrzeugtank ist leer",
|
||||
['vehicle_not_found'] = "Fahrzeug konnte nicht gefunden werden",
|
||||
['pump_not_found'] = "Zapfseule konnte nicht gefunden werden",
|
||||
['vehicle_wrong_fuel'] = "Sie haben für dieses Fahrzeug den falschen Kraftstofftyp verwendet, was zu einer Panne geführt hat.",
|
||||
['incompatible_fuel'] = "Inkompatibler Kraftstofftyp erkannt. Bitte wählen Sie die richtige Betankungsoption für Ihr Fahrzeug aus.",
|
||||
['owned_gas_stations'] = {
|
||||
['balance_jerry_can'] = "Benzinkanister verkauft (%s Liter)",
|
||||
['balance_fuel'] = "Treibstoff verkauft (%s Liter)",
|
||||
['balance_electric'] = "Elektrische Ladung verkauft (%s kWh)",
|
||||
['refund_fuel'] = "Kraftstoff erstattet (%s Liter)",
|
||||
['refund_electric'] = "Stromladung erstattet (%s kWh)",
|
||||
}
|
||||
}
|
||||
if not Lang then Lang = {} end
|
||||
Lang['de'] = {
|
||||
['markers'] = {
|
||||
['open_refuel'] = "Drücke ~INPUT_CONTEXT~, um zu tanken",
|
||||
['open_recharge'] = "Drücke ~INPUT_CONTEXT~, um aufzuladen",
|
||||
['interact_with_vehicle'] = "Drücke ~y~E~w~, um zu interagieren",
|
||||
['return_nozzle'] = "Drücke ~INPUT_CONTEXT~, um die Zapfpistole zurückzugeben",
|
||||
},
|
||||
['target'] = {
|
||||
['open_refuel'] = "Tankmenü öffnen",
|
||||
['open_recharge'] = "Lademenü öffnen",
|
||||
['start_refuel'] = "Fahrzeug betanken",
|
||||
['stop_refuel'] = "Tanken beenden",
|
||||
['return_nozzle'] = "Zapfpistole zurückgeben",
|
||||
},
|
||||
['blip_text'] = "Tankstelle",
|
||||
['not_enough_refuel'] = "Sie haben den gesamten bezahlten Kraftstoff bereits verbraucht. Bitte kaufen Sie bei Bedarf zusätzlichen Treibstoff",
|
||||
['invalid_value'] = "Ungültiger Wert",
|
||||
['not_enough_money'] = "Du hast nicht genug $%s geld um das zu Bezahlen",
|
||||
['not_enough_stock'] = "Diese Tankstelle verfügt nicht über genügend Lagerbestände, um diese Aktion durchzuführen",
|
||||
['refuel_paid'] = "$%s bezahlt zum Tanken",
|
||||
['returned_fuel'] = "Du hast %sL Kraftstoff zurückgegeben und $%s zurückerhalten",
|
||||
['returned_charge'] = "Du hast %skWh Ladung zurückgegeben und $%s zurückerhalten",
|
||||
['jerry_can_paid'] = "$%s bezahlt für den Kanister",
|
||||
['too_far_away'] = "Sie sind zu weit von der Zapfseule entfernt",
|
||||
['vehicle_refueled'] = "Sie haben %sL ins Fahrzeug getankt",
|
||||
['vehicle_recharged'] = "Sie haben %skWh im Fahrzeug aufgeladen",
|
||||
['vehicle_tank_full'] = "Auto ist voll getankt",
|
||||
['vehicle_tank_emptied'] = "Fahrzeugtank ist leer",
|
||||
['vehicle_not_found'] = "Fahrzeug konnte nicht gefunden werden",
|
||||
['pump_not_found'] = "Zapfseule konnte nicht gefunden werden",
|
||||
['vehicle_wrong_fuel'] = "Sie haben für dieses Fahrzeug den falschen Kraftstofftyp verwendet, was zu einer Panne geführt hat.",
|
||||
['incompatible_fuel'] = "Inkompatibler Kraftstofftyp erkannt. Bitte wählen Sie die richtige Betankungsoption für Ihr Fahrzeug aus.",
|
||||
['owned_gas_stations'] = {
|
||||
['balance_jerry_can'] = "Benzinkanister verkauft (%s Liter)",
|
||||
['balance_fuel'] = "Treibstoff verkauft (%s Liter)",
|
||||
['balance_electric'] = "Elektrische Ladung verkauft (%s kWh)",
|
||||
['refund_fuel'] = "Kraftstoff erstattet (%s Liter)",
|
||||
['refund_electric'] = "Stromladung erstattet (%s kWh)",
|
||||
},
|
||||
['fuel_types'] = {
|
||||
['type_title'] = "Kraftstoffart: %s",
|
||||
['electric'] = "Elektrisch",
|
||||
['regular'] = "Regulär",
|
||||
['plus'] = "Plus",
|
||||
['premium'] = "Premium",
|
||||
['diesel'] = "Diesel",
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,41 +1,49 @@
|
|||
if not Lang then Lang = {} end
|
||||
Lang['en'] = {
|
||||
['markers'] = {
|
||||
['open_refuel'] = "Press ~INPUT_CONTEXT~ to refuel",
|
||||
['open_recharge'] = "Press ~INPUT_CONTEXT~ to recharge",
|
||||
['interact_with_vehicle'] = "Press ~y~E~w~ to interact",
|
||||
['return_nozzle'] = "Press ~INPUT_CONTEXT~ to return the nozzle",
|
||||
},
|
||||
['target'] = {
|
||||
['open_refuel'] = "Open refuel menu",
|
||||
['open_recharge'] = "Open recharge menu",
|
||||
['start_refuel'] = "Refuel vehicle",
|
||||
['stop_refuel'] = "Stop refuel",
|
||||
['return_nozzle'] = "Return the nozzle",
|
||||
},
|
||||
['blip_text'] = "Gas stations",
|
||||
['not_enough_refuel'] = "You've already used all the fuel you paid for. Please purchase additional fuel if needed",
|
||||
['invalid_value'] = "Invalid value",
|
||||
['not_enough_money'] = "You don't have $%s to pay this",
|
||||
['not_enough_stock'] = "This gas station don't have enough stock to perform this action",
|
||||
['refuel_paid'] = "Paid $%s for this refuel",
|
||||
['returned_fuel'] = "You've returned %sL of fuel and received back $%s",
|
||||
['returned_charge'] = "You've returned %skWh of fuel and received back $%s",
|
||||
['jerry_can_paid'] = "Paid $%s for this jerry can",
|
||||
['too_far_away'] = "You are too far from the pump",
|
||||
['vehicle_refueled'] = "You refueled %sL in the vehicle",
|
||||
['vehicle_recharged'] = "You recharged %skWh in the vehicle",
|
||||
['vehicle_tank_full'] = "Vehicle tank is full",
|
||||
['vehicle_tank_emptied'] = "Vehicle tank emptied",
|
||||
['vehicle_not_found'] = "Vehicle not found",
|
||||
['pump_not_found'] = "Pump not found",
|
||||
['vehicle_wrong_fuel'] = "You used the wrong fuel type for this vehicle, causing it to break down.",
|
||||
['incompatible_fuel'] = "Incompatible fuel type detected. Please select the correct refueling option for your vehicle.",
|
||||
['owned_gas_stations'] = {
|
||||
['balance_jerry_can'] = "Gas can sold (%s Liters)",
|
||||
['balance_fuel'] = "Fuel sold (%s Liters)",
|
||||
['balance_electric'] = "Electric charge sold (%s kWh)",
|
||||
['refund_fuel'] = "Fuel refunded (%s Liters)",
|
||||
['refund_electric'] = "Electric charge refunded (%s kWh)",
|
||||
}
|
||||
if not Lang then Lang = {} end
|
||||
Lang['en'] = {
|
||||
['markers'] = {
|
||||
['open_refuel'] = "Press ~INPUT_CONTEXT~ to refuel",
|
||||
['open_recharge'] = "Press ~INPUT_CONTEXT~ to recharge",
|
||||
['interact_with_vehicle'] = "Press ~y~E~w~ to interact",
|
||||
['return_nozzle'] = "Press ~INPUT_CONTEXT~ to return the nozzle",
|
||||
},
|
||||
['target'] = {
|
||||
['open_refuel'] = "Open refuel menu",
|
||||
['open_recharge'] = "Open recharge menu",
|
||||
['start_refuel'] = "Refuel vehicle",
|
||||
['stop_refuel'] = "Stop refuel",
|
||||
['return_nozzle'] = "Return the nozzle",
|
||||
},
|
||||
['blip_text'] = "Gas stations",
|
||||
['not_enough_refuel'] = "You've already used all the fuel you paid for. Please purchase additional fuel if needed",
|
||||
['invalid_value'] = "Invalid value",
|
||||
['not_enough_money'] = "You don't have $%s to pay this",
|
||||
['not_enough_stock'] = "This gas station don't have enough stock to perform this action",
|
||||
['refuel_paid'] = "Paid $%s for this refuel",
|
||||
['returned_fuel'] = "You've returned %sL of fuel and received back $%s",
|
||||
['returned_charge'] = "You've returned %skWh of fuel and received back $%s",
|
||||
['jerry_can_paid'] = "Paid $%s for this jerry can",
|
||||
['too_far_away'] = "You are too far from the pump",
|
||||
['vehicle_refueled'] = "You refueled %sL in the vehicle",
|
||||
['vehicle_recharged'] = "You recharged %skWh in the vehicle",
|
||||
['vehicle_tank_full'] = "Vehicle tank is full",
|
||||
['vehicle_tank_emptied'] = "Vehicle tank emptied",
|
||||
['vehicle_not_found'] = "Vehicle not found",
|
||||
['pump_not_found'] = "Pump not found",
|
||||
['vehicle_wrong_fuel'] = "You used the wrong fuel type for this vehicle, causing it to break down.",
|
||||
['incompatible_fuel'] = "Incompatible fuel type detected. Please select the correct refueling option for your vehicle.",
|
||||
['owned_gas_stations'] = {
|
||||
['balance_jerry_can'] = "Gas can sold (%s Liters)",
|
||||
['balance_fuel'] = "Fuel sold (%s Liters)",
|
||||
['balance_electric'] = "Electric charge sold (%s kWh)",
|
||||
['refund_fuel'] = "Fuel refunded (%s Liters)",
|
||||
['refund_electric'] = "Electric charge refunded (%s kWh)",
|
||||
},
|
||||
['fuel_types'] = {
|
||||
['type_title'] = "Fuel Type: %s",
|
||||
['electric'] = "Electric",
|
||||
['regular'] = "Regular",
|
||||
['plus'] = "Plus",
|
||||
['premium'] = "Premium",
|
||||
['diesel'] = "Diesel",
|
||||
},
|
||||
}
|
|
@ -1,41 +1,49 @@
|
|||
if not Lang then Lang = {} end
|
||||
Lang['es'] = {
|
||||
['markers'] = {
|
||||
['open_refuel'] = "Pulsa ~INPUT_CONTEXT~ para repostar",
|
||||
['open_recharge'] = "Pulsa ~INPUT_CONTEXT~ para cargar",
|
||||
['interact_with_vehicle'] = "Pulsa ~y~E~w~ para interactuar",
|
||||
['return_nozzle'] = "Pulsa ~INPUT_CONTEXT~ para devolver la manguera",
|
||||
},
|
||||
['target'] = {
|
||||
['open_refuel'] = "Abrir menú de repostaje",
|
||||
['open_recharge'] = "Abrir menú de carga",
|
||||
['start_refuel'] = "Repostar vehículo",
|
||||
['stop_refuel'] = "Detener repostaje",
|
||||
['return_nozzle'] = "Devolver la manguera",
|
||||
},
|
||||
['blip_text'] = "Gasolineras",
|
||||
['not_enough_refuel'] = "Ya has usado todo el combustible que pagaste. Compra más combustible si es necesario",
|
||||
['invalid_value'] = "Valor inválido",
|
||||
['not_enough_money'] = "No tienes $%s para pagar esto",
|
||||
['not_enough_stock'] = "Esta gasolinera no tiene suficiente stock para realizar esta acción",
|
||||
['refuel_paid'] = "Pagaste $%s por este repostaje",
|
||||
['returned_fuel'] = "Has devuelto %sL de combustible y recibido $%s",
|
||||
['returned_charge'] = "Has devuelto %skWh de carga y recibido $%s",
|
||||
['jerry_can_paid'] = "Pagaste $%s por este bidón de gasolina",
|
||||
['too_far_away'] = "Estás demasiado lejos del surtidor",
|
||||
['vehicle_refueled'] = "Repostaste %sL en el vehículo",
|
||||
['vehicle_recharged'] = "Recargaste %skWh en el vehículo",
|
||||
['vehicle_tank_full'] = "El tanque del vehículo está lleno",
|
||||
['vehicle_tank_emptied'] = "El tanque del vehículo se ha vaciado",
|
||||
['vehicle_not_found'] = "Vehículo no encontrado",
|
||||
['pump_not_found'] = "Surtidor no encontrado",
|
||||
['vehicle_wrong_fuel'] = "Usaste el tipo de combustible incorrecto para este vehículo, causando que se averíe.",
|
||||
['incompatible_fuel'] = "Tipo de combustible incompatible detectado. Por favor, selecciona la opción de repostaje correcta para tu vehículo.",
|
||||
['owned_gas_stations'] = {
|
||||
['balance_jerry_can'] = "Bidón de gasolina vendido (%s Litros)",
|
||||
['balance_fuel'] = "Combustible vendido (%s Litros)",
|
||||
['balance_electric'] = "Carga eléctrica vendida (%s kWh)",
|
||||
['refund_fuel'] = "Combustible reembolsado (%s litros)",
|
||||
['refund_electric'] = "Carga eléctrica reembolsada (%s kWh)",
|
||||
}
|
||||
}
|
||||
if not Lang then Lang = {} end
|
||||
Lang['es'] = {
|
||||
['markers'] = {
|
||||
['open_refuel'] = "Pulsa ~INPUT_CONTEXT~ para repostar",
|
||||
['open_recharge'] = "Pulsa ~INPUT_CONTEXT~ para cargar",
|
||||
['interact_with_vehicle'] = "Pulsa ~y~E~w~ para interactuar",
|
||||
['return_nozzle'] = "Pulsa ~INPUT_CONTEXT~ para devolver la manguera",
|
||||
},
|
||||
['target'] = {
|
||||
['open_refuel'] = "Abrir menú de repostaje",
|
||||
['open_recharge'] = "Abrir menú de carga",
|
||||
['start_refuel'] = "Repostar vehículo",
|
||||
['stop_refuel'] = "Detener repostaje",
|
||||
['return_nozzle'] = "Devolver la manguera",
|
||||
},
|
||||
['blip_text'] = "Gasolineras",
|
||||
['not_enough_refuel'] = "Ya has usado todo el combustible que pagaste. Compra más combustible si es necesario",
|
||||
['invalid_value'] = "Valor inválido",
|
||||
['not_enough_money'] = "No tienes $%s para pagar esto",
|
||||
['not_enough_stock'] = "Esta gasolinera no tiene suficiente stock para realizar esta acción",
|
||||
['refuel_paid'] = "Pagaste $%s por este repostaje",
|
||||
['returned_fuel'] = "Has devuelto %sL de combustible y recibido $%s",
|
||||
['returned_charge'] = "Has devuelto %skWh de carga y recibido $%s",
|
||||
['jerry_can_paid'] = "Pagaste $%s por este bidón de gasolina",
|
||||
['too_far_away'] = "Estás demasiado lejos del surtidor",
|
||||
['vehicle_refueled'] = "Repostaste %sL en el vehículo",
|
||||
['vehicle_recharged'] = "Recargaste %skWh en el vehículo",
|
||||
['vehicle_tank_full'] = "El tanque del vehículo está lleno",
|
||||
['vehicle_tank_emptied'] = "El tanque del vehículo se ha vaciado",
|
||||
['vehicle_not_found'] = "Vehículo no encontrado",
|
||||
['pump_not_found'] = "Surtidor no encontrado",
|
||||
['vehicle_wrong_fuel'] = "Usaste el tipo de combustible incorrecto para este vehículo, causando que se averíe.",
|
||||
['incompatible_fuel'] = "Tipo de combustible incompatible detectado. Por favor, selecciona la opción de repostaje correcta para tu vehículo.",
|
||||
['owned_gas_stations'] = {
|
||||
['balance_jerry_can'] = "Bidón de gasolina vendido (%s Litros)",
|
||||
['balance_fuel'] = "Combustible vendido (%s Litros)",
|
||||
['balance_electric'] = "Carga eléctrica vendida (%s kWh)",
|
||||
['refund_fuel'] = "Combustible reembolsado (%s litros)",
|
||||
['refund_electric'] = "Carga eléctrica reembolsada (%s kWh)",
|
||||
},
|
||||
['fuel_types'] = {
|
||||
['type_title'] = "Tipo de combustible: %s",
|
||||
['electric'] = "Eléctrico",
|
||||
['regular'] = "Sin plomo",
|
||||
['plus'] = "Plus",
|
||||
['premium'] = "Premium",
|
||||
['diesel'] = "Diésel",
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,41 +1,49 @@
|
|||
if not Lang then Lang = {} end
|
||||
Lang['fr'] = {
|
||||
['markers'] = {
|
||||
['open_refuel'] = "Appuyez sur ~INPUT_CONTEXT~ pour faire le plein",
|
||||
['open_recharge'] = "Appuyez sur ~INPUT_CONTEXT~ pour recharger",
|
||||
['interact_with_vehicle'] = "Appuyez sur ~y~E~w~ pour interagir",
|
||||
['return_nozzle'] = "Appuyez sur ~INPUT_CONTEXT~ pour remettre le pistolet",
|
||||
},
|
||||
['target'] = {
|
||||
['open_refuel'] = "Ouvrir le menu de ravitaillement",
|
||||
['open_recharge'] = "Ouvrir le menu de recharge",
|
||||
['start_refuel'] = "Faire le plein du véhicule",
|
||||
['stop_refuel'] = "Arrêter le ravitaillement",
|
||||
['return_nozzle'] = "Ranger le pistolet",
|
||||
},
|
||||
['blip_text'] = "Stations-service",
|
||||
['not_enough_refuel'] = "Vous avez déjà utilisé tout le carburant que vous avez payé. Veuillez acheter plus de carburant si nécessaire",
|
||||
['invalid_value'] = "Valeur invalide",
|
||||
['not_enough_money'] = "Vous n'avez pas $%s pour payer cela",
|
||||
['not_enough_stock'] = "Cette station-service n'a pas assez de stock pour effectuer cette action",
|
||||
['refuel_paid'] = "Vous avez payé $%s pour ce ravitaillement",
|
||||
['returned_fuel'] = "Vous avez rendu %sL de carburant et reçu $%s",
|
||||
['returned_charge'] = "Vous avez rendu %skWh de charge et reçu $%s",
|
||||
['jerry_can_paid'] = "Vous avez payé $%s pour ce bidon d'essence",
|
||||
['too_far_away'] = "Vous êtes trop loin de la pompe",
|
||||
['vehicle_refueled'] = "Vous avez mis %sL dans le véhicule",
|
||||
['vehicle_recharged'] = "Vous avez rechargé %skWh dans le véhicule",
|
||||
['vehicle_tank_full'] = "Le réservoir du véhicule est plein",
|
||||
['vehicle_tank_emptied'] = "Le réservoir du véhicule est vide",
|
||||
['vehicle_not_found'] = "Véhicule non trouvé",
|
||||
['pump_not_found'] = "Pompe non trouvée",
|
||||
['vehicle_wrong_fuel'] = "Vous avez utilisé le mauvais type de carburant pour ce véhicule, ce qui l'a endommagé.",
|
||||
['incompatible_fuel'] = "Type de carburant incompatible détecté. Veuillez sélectionner la bonne option de ravitaillement pour votre véhicule.",
|
||||
['owned_gas_stations'] = {
|
||||
['balance_jerry_can'] = "Bidon d'essence vendu (%s Litres)",
|
||||
['balance_fuel'] = "Carburant vendu (%s Litres)",
|
||||
['balance_electric'] = "Charge électrique vendue (%s kWh)",
|
||||
['refund_fuel'] = "Carburant remboursé (%s litres)",
|
||||
['refund_electric'] = "Recharge électrique remboursée (%s kWh)",
|
||||
}
|
||||
if not Lang then Lang = {} end
|
||||
Lang['fr'] = {
|
||||
['markers'] = {
|
||||
['open_refuel'] = "Appuyez sur ~INPUT_CONTEXT~ pour faire le plein",
|
||||
['open_recharge'] = "Appuyez sur ~INPUT_CONTEXT~ pour recharger",
|
||||
['interact_with_vehicle'] = "Appuyez sur ~y~E~w~ pour interagir",
|
||||
['return_nozzle'] = "Appuyez sur ~INPUT_CONTEXT~ pour remettre le pistolet",
|
||||
},
|
||||
['target'] = {
|
||||
['open_refuel'] = "Ouvrir le menu de ravitaillement",
|
||||
['open_recharge'] = "Ouvrir le menu de recharge",
|
||||
['start_refuel'] = "Faire le plein du véhicule",
|
||||
['stop_refuel'] = "Arrêter le ravitaillement",
|
||||
['return_nozzle'] = "Ranger le pistolet",
|
||||
},
|
||||
['blip_text'] = "Stations-service",
|
||||
['not_enough_refuel'] = "Vous avez déjà utilisé tout le carburant que vous avez payé. Veuillez acheter plus de carburant si nécessaire",
|
||||
['invalid_value'] = "Valeur invalide",
|
||||
['not_enough_money'] = "Vous n'avez pas $%s pour payer cela",
|
||||
['not_enough_stock'] = "Cette station-service n'a pas assez de stock pour effectuer cette action",
|
||||
['refuel_paid'] = "Vous avez payé $%s pour ce ravitaillement",
|
||||
['returned_fuel'] = "Vous avez rendu %sL de carburant et reçu $%s",
|
||||
['returned_charge'] = "Vous avez rendu %skWh de charge et reçu $%s",
|
||||
['jerry_can_paid'] = "Vous avez payé $%s pour ce bidon d'essence",
|
||||
['too_far_away'] = "Vous êtes trop loin de la pompe",
|
||||
['vehicle_refueled'] = "Vous avez mis %sL dans le véhicule",
|
||||
['vehicle_recharged'] = "Vous avez rechargé %skWh dans le véhicule",
|
||||
['vehicle_tank_full'] = "Le réservoir du véhicule est plein",
|
||||
['vehicle_tank_emptied'] = "Le réservoir du véhicule est vide",
|
||||
['vehicle_not_found'] = "Véhicule non trouvé",
|
||||
['pump_not_found'] = "Pompe non trouvée",
|
||||
['vehicle_wrong_fuel'] = "Vous avez utilisé le mauvais type de carburant pour ce véhicule, ce qui l'a endommagé.",
|
||||
['incompatible_fuel'] = "Type de carburant incompatible détecté. Veuillez sélectionner la bonne option de ravitaillement pour votre véhicule.",
|
||||
['owned_gas_stations'] = {
|
||||
['balance_jerry_can'] = "Bidon d'essence vendu (%s Litres)",
|
||||
['balance_fuel'] = "Carburant vendu (%s Litres)",
|
||||
['balance_electric'] = "Charge électrique vendue (%s kWh)",
|
||||
['refund_fuel'] = "Carburant remboursé (%s litres)",
|
||||
['refund_electric'] = "Recharge électrique remboursée (%s kWh)",
|
||||
},
|
||||
['fuel_types'] = {
|
||||
['type_title'] = "Type de carburant : %s",
|
||||
['electric'] = "Électrique",
|
||||
['regular'] = "Ordinaire",
|
||||
['plus'] = "Plus",
|
||||
['premium'] = "Premium",
|
||||
['diesel'] = "Diesel",
|
||||
},
|
||||
}
|
|
@ -1,41 +1,49 @@
|
|||
if not Lang then Lang = {} end
|
||||
Lang['ja'] = {
|
||||
['markers'] = {
|
||||
['open_refuel'] = "~INPUT_CONTEXT~を押して燃料を補給します",
|
||||
['open_recharge'] = "~INPUT_CONTEXT~を押して充電",
|
||||
['interact_with_vehicle'] = "~y~E~w~を押して車両と操作",
|
||||
['return_nozzle'] = "~INPUT_CONTEXT~を押してノズルを戻す",
|
||||
},
|
||||
['target'] = {
|
||||
['open_refuel'] = "燃料補給メニューを開く",
|
||||
['open_recharge'] = "充電メニューを開く",
|
||||
['start_refuel'] = "車両に燃料補給",
|
||||
['stop_refuel'] = "燃料補給を停止",
|
||||
['return_nozzle'] = "ノズルを戻す",
|
||||
},
|
||||
['blip_text'] = "ガソリンスタンド",
|
||||
['not_enough_refuel'] = "既に支払った燃料を使い切っています。必要であれば追加購入してください。",
|
||||
['invalid_value'] = "無効な値です",
|
||||
['not_enough_money'] = "この支払いには$%sが不足しています",
|
||||
['not_enough_stock'] = "このガソリンスタンドでは在庫が不足しているため、この操作は実行できません",
|
||||
['refuel_paid'] = "この燃料補給に$%s支払いました",
|
||||
['returned_fuel'] = "燃料を%sL返却し、$%sを受け取りました",
|
||||
['returned_charge'] = "電力を%skWh返却し、$%sを受け取りました",
|
||||
['jerry_can_paid'] = "このガソリン缶に$%s支払いました",
|
||||
['too_far_away'] = "ポンプから離れすぎています",
|
||||
['vehicle_refueled'] = "車両に%sLの燃料を補給しました",
|
||||
['vehicle_recharged'] = "車両に%s kWhの充電を行いました",
|
||||
['vehicle_tank_full'] = "車両のタンクが満タンです",
|
||||
['vehicle_tank_emptied'] = "車両のタンクが空になりました",
|
||||
['vehicle_not_found'] = "車両が見つかりませんでした",
|
||||
['pump_not_found'] = "ポンプが見つかりませんでした",
|
||||
['vehicle_wrong_fuel'] = "この車両には間違った燃料タイプを使用したため、故障しました。",
|
||||
['incompatible_fuel'] = "互換性のない燃料タイプが検出されました。正しい燃料補給オプションを選択してください。",
|
||||
['owned_gas_stations'] = {
|
||||
['balance_jerry_can'] = "ガソリン缶販売 (%s L)",
|
||||
['balance_fuel'] = "燃料販売 (%s L)",
|
||||
['balance_electric'] = "電気充電販売 (%s kWh)",
|
||||
['refund_fuel'] = "燃料が返金されました(%sリットル)",
|
||||
['refund_electric'] = "電気充電が返金されました(%s kWh)",
|
||||
}
|
||||
if not Lang then Lang = {} end
|
||||
Lang['ja'] = {
|
||||
['markers'] = {
|
||||
['open_refuel'] = "~INPUT_CONTEXT~を押して燃料を補給します",
|
||||
['open_recharge'] = "~INPUT_CONTEXT~を押して充電",
|
||||
['interact_with_vehicle'] = "~y~E~w~を押して車両と操作",
|
||||
['return_nozzle'] = "~INPUT_CONTEXT~を押してノズルを戻す",
|
||||
},
|
||||
['target'] = {
|
||||
['open_refuel'] = "燃料補給メニューを開く",
|
||||
['open_recharge'] = "充電メニューを開く",
|
||||
['start_refuel'] = "車両に燃料補給",
|
||||
['stop_refuel'] = "燃料補給を停止",
|
||||
['return_nozzle'] = "ノズルを戻す",
|
||||
},
|
||||
['blip_text'] = "ガソリンスタンド",
|
||||
['not_enough_refuel'] = "既に支払った燃料を使い切っています。必要であれば追加購入してください。",
|
||||
['invalid_value'] = "無効な値です",
|
||||
['not_enough_money'] = "この支払いには$%sが不足しています",
|
||||
['not_enough_stock'] = "このガソリンスタンドでは在庫が不足しているため、この操作は実行できません",
|
||||
['refuel_paid'] = "この燃料補給に$%s支払いました",
|
||||
['returned_fuel'] = "燃料を%sL返却し、$%sを受け取りました",
|
||||
['returned_charge'] = "電力を%skWh返却し、$%sを受け取りました",
|
||||
['jerry_can_paid'] = "このガソリン缶に$%s支払いました",
|
||||
['too_far_away'] = "ポンプから離れすぎています",
|
||||
['vehicle_refueled'] = "車両に%sLの燃料を補給しました",
|
||||
['vehicle_recharged'] = "車両に%s kWhの充電を行いました",
|
||||
['vehicle_tank_full'] = "車両のタンクが満タンです",
|
||||
['vehicle_tank_emptied'] = "車両のタンクが空になりました",
|
||||
['vehicle_not_found'] = "車両が見つかりませんでした",
|
||||
['pump_not_found'] = "ポンプが見つかりませんでした",
|
||||
['vehicle_wrong_fuel'] = "この車両には間違った燃料タイプを使用したため、故障しました。",
|
||||
['incompatible_fuel'] = "互換性のない燃料タイプが検出されました。正しい燃料補給オプションを選択してください。",
|
||||
['owned_gas_stations'] = {
|
||||
['balance_jerry_can'] = "ガソリン缶販売 (%s L)",
|
||||
['balance_fuel'] = "燃料販売 (%s L)",
|
||||
['balance_electric'] = "電気充電販売 (%s kWh)",
|
||||
['refund_fuel'] = "燃料が返金されました(%sリットル)",
|
||||
['refund_electric'] = "電気充電が返金されました(%s kWh)",
|
||||
},
|
||||
['fuel_types'] = {
|
||||
['type_title'] = "燃料の種類: %s",
|
||||
['electric'] = "電気",
|
||||
['regular'] = "レギュラー",
|
||||
['plus'] = "プラス",
|
||||
['premium'] = "プレミアム",
|
||||
['diesel'] = "ディーゼル",
|
||||
},
|
||||
}
|
|
@ -1,41 +1,49 @@
|
|||
if not Lang then Lang = {} end
|
||||
Lang['tr'] = {
|
||||
['markers'] = {
|
||||
['open_refuel'] = "Yakıt almak için ~INPUT_CONTEXT~ tuşuna basın",
|
||||
['open_recharge'] = "Şarj etmek için ~INPUT_CONTEXT~ tuşuna basın",
|
||||
['interact_with_vehicle'] = "Etkileşim için ~y~E~w~ tuşuna basın",
|
||||
['return_nozzle'] = "Tabancayı geri koymak için ~INPUT_CONTEXT~ tuşuna basın",
|
||||
},
|
||||
['target'] = {
|
||||
['open_refuel'] = "Yakıt menüsünü aç",
|
||||
['open_recharge'] = "Şarj menüsünü aç",
|
||||
['start_refuel'] = "Araca yakıt doldur",
|
||||
['stop_refuel'] = "Yakıt doldurmayı durdur",
|
||||
['return_nozzle'] = "Tabancayı geri koy",
|
||||
},
|
||||
['blip_text'] = "Benzin istasyonları",
|
||||
['not_enough_refuel'] = "Zaten ödediğiniz tüm yakıtı kullandınız. Gerekirse ek yakıt satın alın",
|
||||
['invalid_value'] = "Geçersiz değer",
|
||||
['not_enough_money'] = "Bunu ödemek için $%s paranız yok",
|
||||
['not_enough_stock'] = "Bu benzin istasyonunda bu işlemi gerçekleştirmek için yeterli stok yok",
|
||||
['refuel_paid'] = "Bu yakıt için $%s ödendi",
|
||||
['returned_fuel'] = "%sL yakıt iade ettiniz ve $%s geri aldınız",
|
||||
['returned_charge'] = "%skWh şarj iade ettiniz ve $%s geri aldınız",
|
||||
['jerry_can_paid'] = "Bu bidon için $%s ödendi",
|
||||
['too_far_away'] = "Pompadan çok uzaktasınız",
|
||||
['vehicle_refueled'] = "Araca %sL yakıt dolduruldu",
|
||||
['vehicle_recharged'] = "Araca %skWh şarj yapıldı",
|
||||
['vehicle_tank_full'] = "Araç deposu dolu",
|
||||
['vehicle_tank_emptied'] = "Araç deposu boşaltıldı",
|
||||
['vehicle_not_found'] = "Araç bulunamadı",
|
||||
['pump_not_found'] = "Pompa bulunamadı",
|
||||
['vehicle_wrong_fuel'] = "Bu araç için yanlış yakıt kullandınız ve aracınız bozuldu.",
|
||||
['incompatible_fuel'] = "Uyumsuz yakıt türü tespit edildi. Lütfen aracınız için doğru yakıt seçeneğini seçin.",
|
||||
['owned_gas_stations'] = {
|
||||
['balance_jerry_can'] = "Yakıt bidonu satıldı (%s Litre)",
|
||||
['balance_fuel'] = "Yakıt satıldı (%s Litre)",
|
||||
['balance_electric'] = "Elektrik şarjı satıldı (%s kWh)",
|
||||
['refund_fuel'] = "Yakıt iade edildi (%s litre)",
|
||||
['refund_electric'] = "Elektrik şarjı iade edildi (%s kWh)",
|
||||
}
|
||||
}
|
||||
if not Lang then Lang = {} end
|
||||
Lang['tr'] = {
|
||||
['markers'] = {
|
||||
['open_refuel'] = "Yakıt almak için ~INPUT_CONTEXT~ tuşuna basın",
|
||||
['open_recharge'] = "Şarj etmek için ~INPUT_CONTEXT~ tuşuna basın",
|
||||
['interact_with_vehicle'] = "Etkileşim için ~y~E~w~ tuşuna basın",
|
||||
['return_nozzle'] = "Tabancayı geri koymak için ~INPUT_CONTEXT~ tuşuna basın",
|
||||
},
|
||||
['target'] = {
|
||||
['open_refuel'] = "Yakıt menüsünü aç",
|
||||
['open_recharge'] = "Şarj menüsünü aç",
|
||||
['start_refuel'] = "Araca yakıt doldur",
|
||||
['stop_refuel'] = "Yakıt doldurmayı durdur",
|
||||
['return_nozzle'] = "Tabancayı geri koy",
|
||||
},
|
||||
['blip_text'] = "Benzin istasyonları",
|
||||
['not_enough_refuel'] = "Zaten ödediğiniz tüm yakıtı kullandınız. Gerekirse ek yakıt satın alın",
|
||||
['invalid_value'] = "Geçersiz değer",
|
||||
['not_enough_money'] = "Bunu ödemek için $%s paranız yok",
|
||||
['not_enough_stock'] = "Bu benzin istasyonunda bu işlemi gerçekleştirmek için yeterli stok yok",
|
||||
['refuel_paid'] = "Bu yakıt için $%s ödendi",
|
||||
['returned_fuel'] = "%sL yakıt iade ettiniz ve $%s geri aldınız",
|
||||
['returned_charge'] = "%skWh şarj iade ettiniz ve $%s geri aldınız",
|
||||
['jerry_can_paid'] = "Bu bidon için $%s ödendi",
|
||||
['too_far_away'] = "Pompadan çok uzaktasınız",
|
||||
['vehicle_refueled'] = "Araca %sL yakıt dolduruldu",
|
||||
['vehicle_recharged'] = "Araca %skWh şarj yapıldı",
|
||||
['vehicle_tank_full'] = "Araç deposu dolu",
|
||||
['vehicle_tank_emptied'] = "Araç deposu boşaltıldı",
|
||||
['vehicle_not_found'] = "Araç bulunamadı",
|
||||
['pump_not_found'] = "Pompa bulunamadı",
|
||||
['vehicle_wrong_fuel'] = "Bu araç için yanlış yakıt kullandınız ve aracınız bozuldu.",
|
||||
['incompatible_fuel'] = "Uyumsuz yakıt türü tespit edildi. Lütfen aracınız için doğru yakıt seçeneğini seçin.",
|
||||
['owned_gas_stations'] = {
|
||||
['balance_jerry_can'] = "Yakıt bidonu satıldı (%s Litre)",
|
||||
['balance_fuel'] = "Yakıt satıldı (%s Litre)",
|
||||
['balance_electric'] = "Elektrik şarjı satıldı (%s kWh)",
|
||||
['refund_fuel'] = "Yakıt iade edildi (%s litre)",
|
||||
['refund_electric'] = "Elektrik şarjı iade edildi (%s kWh)",
|
||||
},
|
||||
['fuel_types'] = {
|
||||
['type_title'] = "Yakıt Türü: %s",
|
||||
['electric'] = "Elektrikli",
|
||||
['regular'] = "Normal",
|
||||
['plus'] = "Plus",
|
||||
['premium'] = "Premium",
|
||||
['diesel'] = "Dizel",
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,41 +1,49 @@
|
|||
if not Lang then Lang = {} end
|
||||
Lang['zh-cn'] = {
|
||||
['markers'] = {
|
||||
['open_refuel'] = "按下 ~INPUT_CONTEXT~ 进行加油",
|
||||
['open_recharge'] = "按下 ~INPUT_CONTEXT~ 进行充电",
|
||||
['interact_with_vehicle'] = "按下 ~y~E~w~ 与车辆交互",
|
||||
['return_nozzle'] = "按下 ~INPUT_CONTEXT~ 归还油枪",
|
||||
},
|
||||
['target'] = {
|
||||
['open_refuel'] = "进行加油",
|
||||
['open_recharge'] = "进行充电",
|
||||
['start_refuel'] = "开始加油",
|
||||
['stop_refuel'] = "终止加油",
|
||||
['return_nozzle'] = "归还油枪",
|
||||
},
|
||||
['blip_text'] = "加油站",
|
||||
['not_enough_refuel'] = "您已用完所支付的燃油。如需继续,请购买更多燃油",
|
||||
['invalid_value'] = "无效数值",
|
||||
['not_enough_money'] = "您的账户余额不足支付当前金额 ($%s) ",
|
||||
['not_enough_stock'] = "本站点当前无充足库存完成该操作",
|
||||
['refuel_paid'] = "本次燃油补给消费 $%s",
|
||||
['returned_fuel'] = "你已归还%s升燃料,并收到$%s",
|
||||
['returned_charge'] = "你已归还%skWh电量,并收到$%s",
|
||||
['jerry_can_paid'] = "本次便携油桶购买消费 $%s",
|
||||
['too_far_away'] = "您与加油设备间距超出操作范围!",
|
||||
['vehicle_refueled'] = "车辆成功加注燃油 %s 升(L)",
|
||||
['vehicle_recharged'] = "车辆成功充入电能 %s 千瓦时(kWh)",
|
||||
['vehicle_tank_full'] = "车辆油箱已达最大容量",
|
||||
['vehicle_tank_emptied'] = "车辆油箱燃油已全部清空",
|
||||
['vehicle_not_found'] = "未检测到关联载具",
|
||||
['pump_not_found'] = "未检测到可用加油设备",
|
||||
['vehicle_wrong_fuel'] = "误用燃油类型导致车辆受损, 请立即停止操作!",
|
||||
['incompatible_fuel'] = "燃油类型与车辆配置不匹配,请选择适配的加油方案.",
|
||||
['owned_gas_stations'] = {
|
||||
['balance_jerry_can'] = "便携式油桶销售量 (%s 升)",
|
||||
['balance_fuel'] = "燃油销售总量 (%s 升)",
|
||||
['balance_electric'] = "电能销售收入 (%s 千瓦时)",
|
||||
['refund_fuel'] = "燃料已退款(%s 升)",
|
||||
['refund_electric'] = "电力已退款(%s 千瓦时)",
|
||||
}
|
||||
if not Lang then Lang = {} end
|
||||
Lang['zh-cn'] = {
|
||||
['markers'] = {
|
||||
['open_refuel'] = "按下 ~INPUT_CONTEXT~ 进行加油",
|
||||
['open_recharge'] = "按下 ~INPUT_CONTEXT~ 进行充电",
|
||||
['interact_with_vehicle'] = "按下 ~y~E~w~ 与车辆交互",
|
||||
['return_nozzle'] = "按下 ~INPUT_CONTEXT~ 归还油枪",
|
||||
},
|
||||
['target'] = {
|
||||
['open_refuel'] = "进行加油",
|
||||
['open_recharge'] = "进行充电",
|
||||
['start_refuel'] = "开始加油",
|
||||
['stop_refuel'] = "终止加油",
|
||||
['return_nozzle'] = "归还油枪",
|
||||
},
|
||||
['blip_text'] = "加油站",
|
||||
['not_enough_refuel'] = "您已用完所支付的燃油。如需继续,请购买更多燃油",
|
||||
['invalid_value'] = "无效数值",
|
||||
['not_enough_money'] = "您的账户余额不足支付当前金额 ($%s) ",
|
||||
['not_enough_stock'] = "本站点当前无充足库存完成该操作",
|
||||
['refuel_paid'] = "本次燃油补给消费 $%s",
|
||||
['returned_fuel'] = "你已归还%s升燃料,并收到$%s",
|
||||
['returned_charge'] = "你已归还%skWh电量,并收到$%s",
|
||||
['jerry_can_paid'] = "本次便携油桶购买消费 $%s",
|
||||
['too_far_away'] = "您与加油设备间距超出操作范围!",
|
||||
['vehicle_refueled'] = "车辆成功加注燃油 %s 升(L)",
|
||||
['vehicle_recharged'] = "车辆成功充入电能 %s 千瓦时(kWh)",
|
||||
['vehicle_tank_full'] = "车辆油箱已达最大容量",
|
||||
['vehicle_tank_emptied'] = "车辆油箱燃油已全部清空",
|
||||
['vehicle_not_found'] = "未检测到关联载具",
|
||||
['pump_not_found'] = "未检测到可用加油设备",
|
||||
['vehicle_wrong_fuel'] = "误用燃油类型导致车辆受损, 请立即停止操作!",
|
||||
['incompatible_fuel'] = "燃油类型与车辆配置不匹配,请选择适配的加油方案.",
|
||||
['owned_gas_stations'] = {
|
||||
['balance_jerry_can'] = "便携式油桶销售量 (%s 升)",
|
||||
['balance_fuel'] = "燃油销售总量 (%s 升)",
|
||||
['balance_electric'] = "电能销售收入 (%s 千瓦时)",
|
||||
['refund_fuel'] = "燃料已退款(%s 升)",
|
||||
['refund_electric'] = "电力已退款(%s 千瓦时)",
|
||||
},
|
||||
['fuel_types'] = {
|
||||
['type_title'] = "燃料类型:%s",
|
||||
['electric'] = "电动",
|
||||
['regular'] = "92号燃油",
|
||||
['plus'] = "95号燃油",
|
||||
['premium'] = "98号燃油",
|
||||
['diesel'] = "柴油",
|
||||
},
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -1,85 +1,85 @@
|
|||
if (Lang == undefined) {
|
||||
var Lang = [];
|
||||
}
|
||||
Lang["de"] = {
|
||||
pumpInterface: {
|
||||
stationStock: "{0} L",
|
||||
vehicleFuel: "{0} L",
|
||||
confirm: "Bestätigen",
|
||||
vehicleFuelTooltip: "Aktueller Kraftstoff / Tankkapazität",
|
||||
fuelTypes: {
|
||||
regular: "Regulär",
|
||||
plus: "Plus",
|
||||
premium: "Premium",
|
||||
diesel: "Diesel",
|
||||
},
|
||||
},
|
||||
pumpRefuelDisplay: {
|
||||
liters: "L",
|
||||
carTank: "Autotank",
|
||||
remaining: "Übrig",
|
||||
},
|
||||
confirmRefuelModal: {
|
||||
title: "Bestätigen Sie „Tanken“.",
|
||||
description: "Sie kaufen {0}L {1} Kraftstoff für {2}.",
|
||||
paymentBank: "Bezahlen Sie mit der Bank",
|
||||
paymentCash: "Bezahlen Sie mit Bargeld",
|
||||
},
|
||||
confirmBuyJerryCanModal: {
|
||||
title: "Kauf Bestätigen",
|
||||
paymentBank: "Bezahlen Sie mit der Bank",
|
||||
paymentCash: "Bezahlen Sie mit Bargeld",
|
||||
},
|
||||
confirmFuelChangeModal: {
|
||||
title: "Kraftstoffe können nicht gemischt werden",
|
||||
description: "⚠️ Kraftstoffe können nicht gemischt werden",
|
||||
},
|
||||
electricInterface: {
|
||||
chargerType: {
|
||||
title: "LADEGERÄTETYP",
|
||||
fast: {
|
||||
title: "SCHNELL",
|
||||
power: "220kW",
|
||||
},
|
||||
normal: {
|
||||
title: "NORMAL",
|
||||
power: "100kW",
|
||||
},
|
||||
pricePerKWh: "{0}/kWh",
|
||||
},
|
||||
chargerAmount: {
|
||||
title: "BETRAG WÄHLEN",
|
||||
typeSelected: "{0} AUSGEWÄHLT",
|
||||
placeholder: "Menge",
|
||||
timeToRechargeText: "Zeit zum Aufladen:",
|
||||
timeToRechargeValue: "{0} min {1} sec",
|
||||
},
|
||||
chargerPayment: {
|
||||
title: "Bezahlmethode",
|
||||
money: "Bar",
|
||||
bank: "Karte",
|
||||
payButton: "Bezahlen {0}",
|
||||
},
|
||||
continueButton: "Bestätigen",
|
||||
outOfStock: "Ausverkauft",
|
||||
},
|
||||
rechargerDisplay: {
|
||||
title: "AUFLADEN...",
|
||||
remainingTimeText: "VERBLEIBENDE ZEIT",
|
||||
remainingTimeValue: "{0} min {1} sek",
|
||||
},
|
||||
fuelConsumptionChart: {
|
||||
title: "Kraftstoffverbrauchsdiagramm",
|
||||
chartLabels: {
|
||||
fuel: "Kraftstoff (%)",
|
||||
speed: "Geschwindigkeit (km/h)",
|
||||
consumption: "Verbrauch (L/s)",
|
||||
shortSeconds: "{0}s",
|
||||
},
|
||||
footer: {
|
||||
focus: "F3 zum Fokussieren umschalten",
|
||||
toggleRecording: "Aufnahme umschalten",
|
||||
recordsLength: "Verlaufslänge ({0}s)",
|
||||
},
|
||||
},
|
||||
if (Lang == undefined) {
|
||||
var Lang = [];
|
||||
}
|
||||
Lang["de"] = {
|
||||
pumpInterface: {
|
||||
stationStock: "{0} L",
|
||||
vehicleFuel: "{0} L",
|
||||
confirm: "Bestätigen",
|
||||
vehicleFuelTooltip: "Aktueller Kraftstoff / Tankkapazität",
|
||||
fuelTypes: {
|
||||
regular: "Regulär",
|
||||
plus: "Plus",
|
||||
premium: "Premium",
|
||||
diesel: "Diesel",
|
||||
},
|
||||
},
|
||||
pumpRefuelDisplay: {
|
||||
liters: "L",
|
||||
carTank: "Autotank",
|
||||
remaining: "Übrig",
|
||||
},
|
||||
confirmRefuelModal: {
|
||||
title: "Bestätigen Sie „Tanken“.",
|
||||
description: "Sie kaufen {0}L {1} Kraftstoff für {2}.",
|
||||
paymentBank: "Bezahlen Sie mit der Bank",
|
||||
paymentCash: "Bezahlen Sie mit Bargeld",
|
||||
},
|
||||
confirmBuyJerryCanModal: {
|
||||
title: "Kauf Bestätigen",
|
||||
paymentBank: "Bezahlen Sie mit der Bank",
|
||||
paymentCash: "Bezahlen Sie mit Bargeld",
|
||||
},
|
||||
confirmFuelChangeModal: {
|
||||
title: "Kraftstoffe können nicht gemischt werden",
|
||||
description: "⚠️ Kraftstoffe können nicht gemischt werden",
|
||||
},
|
||||
electricInterface: {
|
||||
chargerType: {
|
||||
title: "LADEGERÄTETYP",
|
||||
fast: {
|
||||
title: "SCHNELL",
|
||||
power: "220kW",
|
||||
},
|
||||
normal: {
|
||||
title: "NORMAL",
|
||||
power: "100kW",
|
||||
},
|
||||
pricePerKWh: "{0}/kWh",
|
||||
},
|
||||
chargerAmount: {
|
||||
title: "BETRAG WÄHLEN",
|
||||
typeSelected: "{0} AUSGEWÄHLT",
|
||||
placeholder: "Menge",
|
||||
timeToRechargeText: "Zeit zum Aufladen:",
|
||||
timeToRechargeValue: "{0} min {1} sec",
|
||||
},
|
||||
chargerPayment: {
|
||||
title: "Bezahlmethode",
|
||||
money: "Bar",
|
||||
bank: "Karte",
|
||||
payButton: "Bezahlen {0}",
|
||||
},
|
||||
continueButton: "Bestätigen",
|
||||
outOfStock: "Ausverkauft",
|
||||
},
|
||||
rechargerDisplay: {
|
||||
title: "AUFLADEN...",
|
||||
remainingTimeText: "VERBLEIBENDE ZEIT",
|
||||
remainingTimeValue: "{0} min {1} sek",
|
||||
},
|
||||
fuelConsumptionChart: {
|
||||
title: "Kraftstoffverbrauchsdiagramm",
|
||||
chartLabels: {
|
||||
fuel: "Kraftstoff (%)",
|
||||
speed: "Geschwindigkeit (km/h)",
|
||||
consumption: "Verbrauch (L/s)",
|
||||
shortSeconds: "{0}s",
|
||||
},
|
||||
footer: {
|
||||
focus: "F3 zum Fokussieren umschalten",
|
||||
toggleRecording: "Aufnahme umschalten",
|
||||
recordsLength: "Verlaufslänge ({0}s)",
|
||||
},
|
||||
},
|
||||
};
|
|
@ -1,85 +1,85 @@
|
|||
if (Lang == undefined) {
|
||||
var Lang = [];
|
||||
}
|
||||
Lang["en"] = {
|
||||
pumpInterface: {
|
||||
stationStock: "{0} L",
|
||||
vehicleFuel: "{0} L",
|
||||
confirm: "CONFIRM",
|
||||
vehicleFuelTooltip: "Current Fuel / Tank Capacity",
|
||||
fuelTypes: {
|
||||
regular: "Regular",
|
||||
plus: "Plus",
|
||||
premium: "Premium",
|
||||
diesel: "Diesel",
|
||||
},
|
||||
},
|
||||
pumpRefuelDisplay: {
|
||||
liters: "L",
|
||||
carTank: "Car Tank",
|
||||
remaining: "Remaining",
|
||||
},
|
||||
confirmRefuelModal: {
|
||||
title: "Confirm Refuel",
|
||||
description: "You are purchasing {0}L of {1} fuel for {2}.",
|
||||
paymentBank: "Pay with bank",
|
||||
paymentCash: "Pay with cash",
|
||||
},
|
||||
confirmBuyJerryCanModal: {
|
||||
title: "Confirm Purchase",
|
||||
paymentBank: "Pay with bank",
|
||||
paymentCash: "Pay with cash",
|
||||
},
|
||||
confirmFuelChangeModal: {
|
||||
title: "Fuels cannot be mixed",
|
||||
description: "⚠️ To change the fuel type in your vehicle, the tank will be emptied.",
|
||||
},
|
||||
electricInterface: {
|
||||
chargerType: {
|
||||
title: "CHARGER TYPE",
|
||||
fast: {
|
||||
title: "FAST",
|
||||
power: "220kW",
|
||||
},
|
||||
normal: {
|
||||
title: "NORMAL",
|
||||
power: "100kW",
|
||||
},
|
||||
pricePerKWh: "{0}/kWh",
|
||||
},
|
||||
chargerAmount: {
|
||||
title: "SELECT AMOUNT",
|
||||
typeSelected: "{0} CHARGER",
|
||||
placeholder: "Amount",
|
||||
timeToRechargeText: "Time to recharge:",
|
||||
timeToRechargeValue: "{0} min {1} sec",
|
||||
},
|
||||
chargerPayment: {
|
||||
title: "PAYMENT METHOD",
|
||||
money: "MONEY",
|
||||
bank: "BANK",
|
||||
payButton: "PAY {0}",
|
||||
},
|
||||
continueButton: "CONTINUE",
|
||||
outOfStock: "Out of stock",
|
||||
},
|
||||
rechargerDisplay: {
|
||||
title: "CHARGING...",
|
||||
remainingTimeText: "REMAINING TIME",
|
||||
remainingTimeValue: "{0} min {1} sec",
|
||||
},
|
||||
fuelConsumptionChart: {
|
||||
title: "Fuel consumption chart",
|
||||
chartLabels: {
|
||||
fuel: "Fuel (%)",
|
||||
speed: "Speed (km/h)",
|
||||
consumption: "Consumption (L/s)",
|
||||
shortSeconds: "{0}s",
|
||||
},
|
||||
footer: {
|
||||
focus: "F3 to toggle focus",
|
||||
toggleRecording: "Toggle Recording",
|
||||
recordsLength: "History Length ({0}s)",
|
||||
},
|
||||
},
|
||||
if (Lang == undefined) {
|
||||
var Lang = [];
|
||||
}
|
||||
Lang["en"] = {
|
||||
pumpInterface: {
|
||||
stationStock: "{0} L",
|
||||
vehicleFuel: "{0} L",
|
||||
confirm: "CONFIRM",
|
||||
vehicleFuelTooltip: "Current Fuel / Tank Capacity",
|
||||
fuelTypes: {
|
||||
regular: "Regular",
|
||||
plus: "Plus",
|
||||
premium: "Premium",
|
||||
diesel: "Diesel",
|
||||
},
|
||||
},
|
||||
pumpRefuelDisplay: {
|
||||
liters: "L",
|
||||
carTank: "Car Tank",
|
||||
remaining: "Remaining",
|
||||
},
|
||||
confirmRefuelModal: {
|
||||
title: "Confirm Refuel",
|
||||
description: "You are purchasing {0}L of {1} fuel for {2}.",
|
||||
paymentBank: "Pay with bank",
|
||||
paymentCash: "Pay with cash",
|
||||
},
|
||||
confirmBuyJerryCanModal: {
|
||||
title: "Confirm Purchase",
|
||||
paymentBank: "Pay with bank",
|
||||
paymentCash: "Pay with cash",
|
||||
},
|
||||
confirmFuelChangeModal: {
|
||||
title: "Fuels cannot be mixed",
|
||||
description: "⚠️ To change the fuel type in your vehicle, the tank will be emptied.",
|
||||
},
|
||||
electricInterface: {
|
||||
chargerType: {
|
||||
title: "CHARGER TYPE",
|
||||
fast: {
|
||||
title: "FAST",
|
||||
power: "220kW",
|
||||
},
|
||||
normal: {
|
||||
title: "NORMAL",
|
||||
power: "100kW",
|
||||
},
|
||||
pricePerKWh: "{0}/kWh",
|
||||
},
|
||||
chargerAmount: {
|
||||
title: "SELECT AMOUNT",
|
||||
typeSelected: "{0} CHARGER",
|
||||
placeholder: "Amount",
|
||||
timeToRechargeText: "Time to recharge:",
|
||||
timeToRechargeValue: "{0} min {1} sec",
|
||||
},
|
||||
chargerPayment: {
|
||||
title: "PAYMENT METHOD",
|
||||
money: "MONEY",
|
||||
bank: "BANK",
|
||||
payButton: "PAY {0}",
|
||||
},
|
||||
continueButton: "CONTINUE",
|
||||
outOfStock: "Out of stock",
|
||||
},
|
||||
rechargerDisplay: {
|
||||
title: "CHARGING...",
|
||||
remainingTimeText: "REMAINING TIME",
|
||||
remainingTimeValue: "{0} min {1} sec",
|
||||
},
|
||||
fuelConsumptionChart: {
|
||||
title: "Fuel consumption chart",
|
||||
chartLabels: {
|
||||
fuel: "Fuel (%)",
|
||||
speed: "Speed (km/h)",
|
||||
consumption: "Consumption (L/s)",
|
||||
shortSeconds: "{0}s",
|
||||
},
|
||||
footer: {
|
||||
focus: "F3 to toggle focus",
|
||||
toggleRecording: "Toggle Recording",
|
||||
recordsLength: "History Length ({0}s)",
|
||||
},
|
||||
},
|
||||
};
|
|
@ -1,85 +1,85 @@
|
|||
if (Lang == undefined) {
|
||||
var Lang = [];
|
||||
}
|
||||
Lang["es"] = {
|
||||
pumpInterface: {
|
||||
stationStock: "{0} L",
|
||||
vehicleFuel: "{0} L",
|
||||
confirm: "CONFIRMAR",
|
||||
vehicleFuelTooltip: "Combustible actual / Capacidad del tanque",
|
||||
fuelTypes: {
|
||||
regular: "Sin plomo",
|
||||
plus: "Plus",
|
||||
premium: "Premium",
|
||||
diesel: "Diésel",
|
||||
},
|
||||
},
|
||||
pumpRefuelDisplay: {
|
||||
liters: "L",
|
||||
carTank: "Depósito del coche",
|
||||
remaining: "Restante",
|
||||
},
|
||||
confirmRefuelModal: {
|
||||
title: "Confirmar Repostaje",
|
||||
description: "Estás comprando {0}L de combustible {1} por {2}.",
|
||||
paymentBank: "Pagar con el banco",
|
||||
paymentCash: "Pagar en efectivo",
|
||||
},
|
||||
confirmBuyJerryCanModal: {
|
||||
title: "Confirmar Compra",
|
||||
paymentBank: "Pagar con el banco",
|
||||
paymentCash: "Pagar en efectivo",
|
||||
},
|
||||
confirmFuelChangeModal: {
|
||||
title: "No se pueden mezclar combustibles",
|
||||
description: "⚠️ Para cambiar el tipo de combustible en tu vehículo, el depósito se vaciará.",
|
||||
},
|
||||
electricInterface: {
|
||||
chargerType: {
|
||||
title: "TIPO DE CARGADOR",
|
||||
fast: {
|
||||
title: "RÁPIDO",
|
||||
power: "220kW",
|
||||
},
|
||||
normal: {
|
||||
title: "NORMAL",
|
||||
power: "100kW",
|
||||
},
|
||||
pricePerKWh: "{0}/kWh",
|
||||
},
|
||||
chargerAmount: {
|
||||
title: "SELECCIONAR CANTIDAD",
|
||||
typeSelected: "CARGADOR {0}",
|
||||
placeholder: "Cantidad",
|
||||
timeToRechargeText: "Tiempo de recarga:",
|
||||
timeToRechargeValue: "{0} min {1} seg",
|
||||
},
|
||||
chargerPayment: {
|
||||
title: "MÉTODO DE PAGO",
|
||||
money: "EFECTIVO",
|
||||
bank: "BANCO",
|
||||
payButton: "PAGAR {0}",
|
||||
},
|
||||
continueButton: "CONTINUAR",
|
||||
outOfStock: "Sin stock",
|
||||
},
|
||||
rechargerDisplay: {
|
||||
title: "CARGANDO...",
|
||||
remainingTimeText: "TIEMPO RESTANTE",
|
||||
remainingTimeValue: "{0} min {1} seg",
|
||||
},
|
||||
fuelConsumptionChart: {
|
||||
title: "Gráfico de consumo de combustible",
|
||||
chartLabels: {
|
||||
fuel: "Combustible (%)",
|
||||
speed: "Velocidad (km/h)",
|
||||
consumption: "Consumo (L/s)",
|
||||
shortSeconds: "{0}s",
|
||||
},
|
||||
footer: {
|
||||
focus: "F3 para alternar enfoque",
|
||||
toggleRecording: "Alternar grabación",
|
||||
recordsLength: "Duración del historial ({0}s)",
|
||||
},
|
||||
},
|
||||
};
|
||||
if (Lang == undefined) {
|
||||
var Lang = [];
|
||||
}
|
||||
Lang["es"] = {
|
||||
pumpInterface: {
|
||||
stationStock: "{0} L",
|
||||
vehicleFuel: "{0} L",
|
||||
confirm: "CONFIRMAR",
|
||||
vehicleFuelTooltip: "Combustible actual / Capacidad del tanque",
|
||||
fuelTypes: {
|
||||
regular: "Sin plomo",
|
||||
plus: "Plus",
|
||||
premium: "Premium",
|
||||
diesel: "Diésel",
|
||||
},
|
||||
},
|
||||
pumpRefuelDisplay: {
|
||||
liters: "L",
|
||||
carTank: "Depósito del coche",
|
||||
remaining: "Restante",
|
||||
},
|
||||
confirmRefuelModal: {
|
||||
title: "Confirmar Repostaje",
|
||||
description: "Estás comprando {0}L de combustible {1} por {2}.",
|
||||
paymentBank: "Pagar con el banco",
|
||||
paymentCash: "Pagar en efectivo",
|
||||
},
|
||||
confirmBuyJerryCanModal: {
|
||||
title: "Confirmar Compra",
|
||||
paymentBank: "Pagar con el banco",
|
||||
paymentCash: "Pagar en efectivo",
|
||||
},
|
||||
confirmFuelChangeModal: {
|
||||
title: "No se pueden mezclar combustibles",
|
||||
description: "⚠️ Para cambiar el tipo de combustible en tu vehículo, el depósito se vaciará.",
|
||||
},
|
||||
electricInterface: {
|
||||
chargerType: {
|
||||
title: "TIPO DE CARGADOR",
|
||||
fast: {
|
||||
title: "RÁPIDO",
|
||||
power: "220kW",
|
||||
},
|
||||
normal: {
|
||||
title: "NORMAL",
|
||||
power: "100kW",
|
||||
},
|
||||
pricePerKWh: "{0}/kWh",
|
||||
},
|
||||
chargerAmount: {
|
||||
title: "SELECCIONAR CANTIDAD",
|
||||
typeSelected: "CARGADOR {0}",
|
||||
placeholder: "Cantidad",
|
||||
timeToRechargeText: "Tiempo de recarga:",
|
||||
timeToRechargeValue: "{0} min {1} seg",
|
||||
},
|
||||
chargerPayment: {
|
||||
title: "MÉTODO DE PAGO",
|
||||
money: "EFECTIVO",
|
||||
bank: "BANCO",
|
||||
payButton: "PAGAR {0}",
|
||||
},
|
||||
continueButton: "CONTINUAR",
|
||||
outOfStock: "Sin stock",
|
||||
},
|
||||
rechargerDisplay: {
|
||||
title: "CARGANDO...",
|
||||
remainingTimeText: "TIEMPO RESTANTE",
|
||||
remainingTimeValue: "{0} min {1} seg",
|
||||
},
|
||||
fuelConsumptionChart: {
|
||||
title: "Gráfico de consumo de combustible",
|
||||
chartLabels: {
|
||||
fuel: "Combustible (%)",
|
||||
speed: "Velocidad (km/h)",
|
||||
consumption: "Consumo (L/s)",
|
||||
shortSeconds: "{0}s",
|
||||
},
|
||||
footer: {
|
||||
focus: "F3 para alternar enfoque",
|
||||
toggleRecording: "Alternar grabación",
|
||||
recordsLength: "Duración del historial ({0}s)",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -1,85 +1,85 @@
|
|||
if (Lang == undefined) {
|
||||
var Lang = [];
|
||||
}
|
||||
Lang["fr"] = {
|
||||
pumpInterface: {
|
||||
stationStock: "{0} L",
|
||||
vehicleFuel: "{0} L",
|
||||
confirm: "CONFIRMER",
|
||||
vehicleFuelTooltip: "Carburant actuel / Capacité du réservoir",
|
||||
fuelTypes: {
|
||||
regular: "Ordinaire",
|
||||
plus: "Plus",
|
||||
premium: "Premium",
|
||||
diesel: "Diesel",
|
||||
},
|
||||
},
|
||||
pumpRefuelDisplay: {
|
||||
liters: "L",
|
||||
carTank: "Réservoir",
|
||||
remaining: "Restant",
|
||||
},
|
||||
confirmRefuelModal: {
|
||||
title: "Confirmer le ravitaillement",
|
||||
description: "Vous achetez {0} L de carburant {1} pour {2}.",
|
||||
paymentBank: "Payer avec la banque",
|
||||
paymentCash: "Payer en espèces",
|
||||
},
|
||||
confirmBuyJerryCanModal: {
|
||||
title: "Confirmer l'achat",
|
||||
paymentBank: "Payer avec la banque",
|
||||
paymentCash: "Payer en espèces",
|
||||
},
|
||||
confirmFuelChangeModal: {
|
||||
title: "Les carburants ne peuvent pas être mélangés",
|
||||
description: "⚠️ Pour changer le type de carburant dans votre véhicule, le réservoir sera vidé.",
|
||||
},
|
||||
electricInterface: {
|
||||
chargerType: {
|
||||
title: "TYPE DE CHARGEUR",
|
||||
fast: {
|
||||
title: "RAPIDE",
|
||||
power: "220kW",
|
||||
},
|
||||
normal: {
|
||||
title: "NORMAL",
|
||||
power: "100kW",
|
||||
},
|
||||
pricePerKWh: "{0}/kWh",
|
||||
},
|
||||
chargerAmount: {
|
||||
title: "SÉLECTIONNER LA QUANTITÉ",
|
||||
typeSelected: "{0} CHARGEUR",
|
||||
placeholder: "Quantité",
|
||||
timeToRechargeText: "Temps pour recharger :",
|
||||
timeToRechargeValue: "{0} min {1} sec",
|
||||
},
|
||||
chargerPayment: {
|
||||
title: "MODE DE PAIEMENT",
|
||||
money: "ESPÈCES",
|
||||
bank: "BANQUE",
|
||||
payButton: "PAYER {0}",
|
||||
},
|
||||
continueButton: "CONTINUER",
|
||||
outOfStock: "Rupture de stock",
|
||||
},
|
||||
rechargerDisplay: {
|
||||
title: "CHARGE EN COURS...",
|
||||
remainingTimeText: "TEMPS RESTANT",
|
||||
remainingTimeValue: "{0} min {1} sec",
|
||||
},
|
||||
fuelConsumptionChart: {
|
||||
title: "Graphique de consommation de carburant",
|
||||
chartLabels: {
|
||||
fuel: "Carburant (%)",
|
||||
speed: "Vitesse (km/h)",
|
||||
consumption: "Consommation (L/s)",
|
||||
shortSeconds: "{0}s",
|
||||
},
|
||||
footer: {
|
||||
focus: "F3 pour basculer le focus",
|
||||
toggleRecording: "Activer/Désactiver l’enregistrement",
|
||||
recordsLength: "Durée de l’historique ({0}s)",
|
||||
},
|
||||
},
|
||||
};
|
||||
if (Lang == undefined) {
|
||||
var Lang = [];
|
||||
}
|
||||
Lang["fr"] = {
|
||||
pumpInterface: {
|
||||
stationStock: "{0} L",
|
||||
vehicleFuel: "{0} L",
|
||||
confirm: "CONFIRMER",
|
||||
vehicleFuelTooltip: "Carburant actuel / Capacité du réservoir",
|
||||
fuelTypes: {
|
||||
regular: "Ordinaire",
|
||||
plus: "Plus",
|
||||
premium: "Premium",
|
||||
diesel: "Diesel",
|
||||
},
|
||||
},
|
||||
pumpRefuelDisplay: {
|
||||
liters: "L",
|
||||
carTank: "Réservoir",
|
||||
remaining: "Restant",
|
||||
},
|
||||
confirmRefuelModal: {
|
||||
title: "Confirmer le ravitaillement",
|
||||
description: "Vous achetez {0} L de carburant {1} pour {2}.",
|
||||
paymentBank: "Payer avec la banque",
|
||||
paymentCash: "Payer en espèces",
|
||||
},
|
||||
confirmBuyJerryCanModal: {
|
||||
title: "Confirmer l'achat",
|
||||
paymentBank: "Payer avec la banque",
|
||||
paymentCash: "Payer en espèces",
|
||||
},
|
||||
confirmFuelChangeModal: {
|
||||
title: "Les carburants ne peuvent pas être mélangés",
|
||||
description: "⚠️ Pour changer le type de carburant dans votre véhicule, le réservoir sera vidé.",
|
||||
},
|
||||
electricInterface: {
|
||||
chargerType: {
|
||||
title: "TYPE DE CHARGEUR",
|
||||
fast: {
|
||||
title: "RAPIDE",
|
||||
power: "220kW",
|
||||
},
|
||||
normal: {
|
||||
title: "NORMAL",
|
||||
power: "100kW",
|
||||
},
|
||||
pricePerKWh: "{0}/kWh",
|
||||
},
|
||||
chargerAmount: {
|
||||
title: "SÉLECTIONNER LA QUANTITÉ",
|
||||
typeSelected: "{0} CHARGEUR",
|
||||
placeholder: "Quantité",
|
||||
timeToRechargeText: "Temps pour recharger :",
|
||||
timeToRechargeValue: "{0} min {1} sec",
|
||||
},
|
||||
chargerPayment: {
|
||||
title: "MODE DE PAIEMENT",
|
||||
money: "ESPÈCES",
|
||||
bank: "BANQUE",
|
||||
payButton: "PAYER {0}",
|
||||
},
|
||||
continueButton: "CONTINUER",
|
||||
outOfStock: "Rupture de stock",
|
||||
},
|
||||
rechargerDisplay: {
|
||||
title: "CHARGE EN COURS...",
|
||||
remainingTimeText: "TEMPS RESTANT",
|
||||
remainingTimeValue: "{0} min {1} sec",
|
||||
},
|
||||
fuelConsumptionChart: {
|
||||
title: "Graphique de consommation de carburant",
|
||||
chartLabels: {
|
||||
fuel: "Carburant (%)",
|
||||
speed: "Vitesse (km/h)",
|
||||
consumption: "Consommation (L/s)",
|
||||
shortSeconds: "{0}s",
|
||||
},
|
||||
footer: {
|
||||
focus: "F3 pour basculer le focus",
|
||||
toggleRecording: "Activer/Désactiver l’enregistrement",
|
||||
recordsLength: "Durée de l’historique ({0}s)",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -1,85 +1,85 @@
|
|||
if (Lang == undefined) {
|
||||
var Lang = [];
|
||||
}
|
||||
Lang["ja"] = {
|
||||
pumpInterface: {
|
||||
stationStock: "{0} L",
|
||||
vehicleFuel: "{0} L",
|
||||
confirm: "確認",
|
||||
vehicleFuelTooltip: "現在の燃料 / タンク容量",
|
||||
fuelTypes: {
|
||||
regular: "レギュラー",
|
||||
plus: "プラス",
|
||||
premium: "プレミアム",
|
||||
diesel: "ディーゼル",
|
||||
},
|
||||
},
|
||||
pumpRefuelDisplay: {
|
||||
liters: "L",
|
||||
carTank: "自動車タンク",
|
||||
remaining: "残り",
|
||||
},
|
||||
confirmRefuelModal: {
|
||||
title: "給油の確認",
|
||||
description: "{0}Lの{1}を{2}で購入します。",
|
||||
paymentBank: "銀行で支払う",
|
||||
paymentCash: "現金で支払う",
|
||||
},
|
||||
confirmBuyJerryCanModal: {
|
||||
title: "購入を確認する",
|
||||
paymentBank: "銀行で支払う",
|
||||
paymentCash: "現金で支払う",
|
||||
},
|
||||
confirmFuelChangeModal: {
|
||||
title: "燃料の混合はできません",
|
||||
description: "⚠️ 燃料の種類を変更する場合はタンクを空にしてください。",
|
||||
},
|
||||
electricInterface: {
|
||||
chargerType: {
|
||||
title: "チャージャータイプ",
|
||||
fast: {
|
||||
title: "高速",
|
||||
power: "220kW",
|
||||
},
|
||||
normal: {
|
||||
title: "普通",
|
||||
power: "100kW",
|
||||
},
|
||||
pricePerKWh: "{0}/kWh",
|
||||
},
|
||||
chargerAmount: {
|
||||
title: "金額選択",
|
||||
typeSelected: "{0}チャージャー",
|
||||
placeholder: "金額",
|
||||
timeToRechargeText: "充電時間:",
|
||||
timeToRechargeValue: "{0} 分 {1} 秒",
|
||||
},
|
||||
chargerPayment: {
|
||||
title: "支払い方法",
|
||||
money: "現金",
|
||||
bank: "銀行",
|
||||
payButton: "{0}で支払う",
|
||||
},
|
||||
continueButton: "決定",
|
||||
outOfStock: "在庫切れ",
|
||||
},
|
||||
rechargerDisplay: {
|
||||
title: "充電中・・・",
|
||||
remainingTimeText: "残り時間",
|
||||
remainingTimeValue: "{0} 分 {1} 秒",
|
||||
},
|
||||
fuelConsumptionChart: {
|
||||
title: "燃料消費チャート",
|
||||
chartLabels: {
|
||||
fuel: "燃料 (%)",
|
||||
speed: "速度 (km/h)",
|
||||
consumption: "消費量 (L/s)",
|
||||
shortSeconds: "{0}秒",
|
||||
},
|
||||
footer: {
|
||||
focus: "F3でフォーカス切替",
|
||||
toggleRecording: "記録の切り替え",
|
||||
recordsLength: "履歴の長さ ({0}秒)",
|
||||
},
|
||||
},
|
||||
if (Lang == undefined) {
|
||||
var Lang = [];
|
||||
}
|
||||
Lang["ja"] = {
|
||||
pumpInterface: {
|
||||
stationStock: "{0} L",
|
||||
vehicleFuel: "{0} L",
|
||||
confirm: "確認",
|
||||
vehicleFuelTooltip: "現在の燃料 / タンク容量",
|
||||
fuelTypes: {
|
||||
regular: "レギュラー",
|
||||
plus: "プラス",
|
||||
premium: "プレミアム",
|
||||
diesel: "ディーゼル",
|
||||
},
|
||||
},
|
||||
pumpRefuelDisplay: {
|
||||
liters: "L",
|
||||
carTank: "自動車タンク",
|
||||
remaining: "残り",
|
||||
},
|
||||
confirmRefuelModal: {
|
||||
title: "給油の確認",
|
||||
description: "{0}Lの{1}を{2}で購入します。",
|
||||
paymentBank: "銀行で支払う",
|
||||
paymentCash: "現金で支払う",
|
||||
},
|
||||
confirmBuyJerryCanModal: {
|
||||
title: "購入を確認する",
|
||||
paymentBank: "銀行で支払う",
|
||||
paymentCash: "現金で支払う",
|
||||
},
|
||||
confirmFuelChangeModal: {
|
||||
title: "燃料の混合はできません",
|
||||
description: "⚠️ 燃料の種類を変更する場合はタンクを空にしてください。",
|
||||
},
|
||||
electricInterface: {
|
||||
chargerType: {
|
||||
title: "チャージャータイプ",
|
||||
fast: {
|
||||
title: "高速",
|
||||
power: "220kW",
|
||||
},
|
||||
normal: {
|
||||
title: "普通",
|
||||
power: "100kW",
|
||||
},
|
||||
pricePerKWh: "{0}/kWh",
|
||||
},
|
||||
chargerAmount: {
|
||||
title: "金額選択",
|
||||
typeSelected: "{0}チャージャー",
|
||||
placeholder: "金額",
|
||||
timeToRechargeText: "充電時間:",
|
||||
timeToRechargeValue: "{0} 分 {1} 秒",
|
||||
},
|
||||
chargerPayment: {
|
||||
title: "支払い方法",
|
||||
money: "現金",
|
||||
bank: "銀行",
|
||||
payButton: "{0}で支払う",
|
||||
},
|
||||
continueButton: "決定",
|
||||
outOfStock: "在庫切れ",
|
||||
},
|
||||
rechargerDisplay: {
|
||||
title: "充電中・・・",
|
||||
remainingTimeText: "残り時間",
|
||||
remainingTimeValue: "{0} 分 {1} 秒",
|
||||
},
|
||||
fuelConsumptionChart: {
|
||||
title: "燃料消費チャート",
|
||||
chartLabels: {
|
||||
fuel: "燃料 (%)",
|
||||
speed: "速度 (km/h)",
|
||||
consumption: "消費量 (L/s)",
|
||||
shortSeconds: "{0}秒",
|
||||
},
|
||||
footer: {
|
||||
focus: "F3でフォーカス切替",
|
||||
toggleRecording: "記録の切り替え",
|
||||
recordsLength: "履歴の長さ ({0}秒)",
|
||||
},
|
||||
},
|
||||
};
|
|
@ -1,85 +1,85 @@
|
|||
if (Lang == undefined) {
|
||||
var Lang = [];
|
||||
}
|
||||
Lang["tr"] = {
|
||||
pumpInterface: {
|
||||
stationStock: "{0} L",
|
||||
vehicleFuel: "{0} L",
|
||||
confirm: "ONAYLA",
|
||||
vehicleFuelTooltip: "Mevcut Yakıt / Depo Kapasitesi",
|
||||
fuelTypes: {
|
||||
regular: "Normal",
|
||||
plus: "Plus",
|
||||
premium: "Premium",
|
||||
diesel: "Dizel",
|
||||
},
|
||||
},
|
||||
pumpRefuelDisplay: {
|
||||
liters: "L",
|
||||
carTank: "Araç Deposu",
|
||||
remaining: "Kalan",
|
||||
},
|
||||
confirmRefuelModal: {
|
||||
title: "Yakıt Alımını Onayla",
|
||||
description: "{0}L {1} yakıtı {2} karşılığında satın alıyorsunuz.",
|
||||
paymentBank: "Banka ile öde",
|
||||
paymentCash: "Nakit ile öde",
|
||||
},
|
||||
confirmBuyJerryCanModal: {
|
||||
title: "Satın Alımı Onayla",
|
||||
paymentBank: "Banka ile öde",
|
||||
paymentCash: "Nakit ile öde",
|
||||
},
|
||||
confirmFuelChangeModal: {
|
||||
title: "Yakıtlar Karıştırılamaz",
|
||||
description: "⚠️ Araçtaki yakıt türünü değiştirmek için depo boşaltılacaktır.",
|
||||
},
|
||||
electricInterface: {
|
||||
chargerType: {
|
||||
title: "ŞARJ CİHAZI TÜRÜ",
|
||||
fast: {
|
||||
title: "HIZLI",
|
||||
power: "220kW",
|
||||
},
|
||||
normal: {
|
||||
title: "NORMAL",
|
||||
power: "100kW",
|
||||
},
|
||||
pricePerKWh: "{0}/kWh",
|
||||
},
|
||||
chargerAmount: {
|
||||
title: "MİKTAR SEÇİN",
|
||||
typeSelected: "{0} ŞARJ CİHAZI",
|
||||
placeholder: "Miktar",
|
||||
timeToRechargeText: "Şarj süresi:",
|
||||
timeToRechargeValue: "{0} dk {1} sn",
|
||||
},
|
||||
chargerPayment: {
|
||||
title: "ÖDEME YÖNTEMİ",
|
||||
money: "NAKİT",
|
||||
bank: "BANKA",
|
||||
payButton: "{0} ÖDE",
|
||||
},
|
||||
continueButton: "DEVAM",
|
||||
outOfStock: "Stokta yok",
|
||||
},
|
||||
rechargerDisplay: {
|
||||
title: "ŞARJ EDİLİYOR...",
|
||||
remainingTimeText: "KALAN SÜRE",
|
||||
remainingTimeValue: "{0} dk {1} sn",
|
||||
},
|
||||
fuelConsumptionChart: {
|
||||
title: "Yakıt tüketim grafiği",
|
||||
chartLabels: {
|
||||
fuel: "Yakıt (%)",
|
||||
speed: "Hız (km/s)",
|
||||
consumption: "Tüketim (L/s)",
|
||||
shortSeconds: "{0}s",
|
||||
},
|
||||
footer: {
|
||||
focus: "Odağı değiştirmek için F3",
|
||||
toggleRecording: "Kaydı Aç/Kapat",
|
||||
recordsLength: "Geçmiş Uzunluğu ({0}s)",
|
||||
},
|
||||
},
|
||||
};
|
||||
if (Lang == undefined) {
|
||||
var Lang = [];
|
||||
}
|
||||
Lang["tr"] = {
|
||||
pumpInterface: {
|
||||
stationStock: "{0} L",
|
||||
vehicleFuel: "{0} L",
|
||||
confirm: "ONAYLA",
|
||||
vehicleFuelTooltip: "Mevcut Yakıt / Depo Kapasitesi",
|
||||
fuelTypes: {
|
||||
regular: "Normal",
|
||||
plus: "Plus",
|
||||
premium: "Premium",
|
||||
diesel: "Dizel",
|
||||
},
|
||||
},
|
||||
pumpRefuelDisplay: {
|
||||
liters: "L",
|
||||
carTank: "Araç Deposu",
|
||||
remaining: "Kalan",
|
||||
},
|
||||
confirmRefuelModal: {
|
||||
title: "Yakıt Alımını Onayla",
|
||||
description: "{0}L {1} yakıtı {2} karşılığında satın alıyorsunuz.",
|
||||
paymentBank: "Banka ile öde",
|
||||
paymentCash: "Nakit ile öde",
|
||||
},
|
||||
confirmBuyJerryCanModal: {
|
||||
title: "Satın Alımı Onayla",
|
||||
paymentBank: "Banka ile öde",
|
||||
paymentCash: "Nakit ile öde",
|
||||
},
|
||||
confirmFuelChangeModal: {
|
||||
title: "Yakıtlar Karıştırılamaz",
|
||||
description: "⚠️ Araçtaki yakıt türünü değiştirmek için depo boşaltılacaktır.",
|
||||
},
|
||||
electricInterface: {
|
||||
chargerType: {
|
||||
title: "ŞARJ CİHAZI TÜRÜ",
|
||||
fast: {
|
||||
title: "HIZLI",
|
||||
power: "220kW",
|
||||
},
|
||||
normal: {
|
||||
title: "NORMAL",
|
||||
power: "100kW",
|
||||
},
|
||||
pricePerKWh: "{0}/kWh",
|
||||
},
|
||||
chargerAmount: {
|
||||
title: "MİKTAR SEÇİN",
|
||||
typeSelected: "{0} ŞARJ CİHAZI",
|
||||
placeholder: "Miktar",
|
||||
timeToRechargeText: "Şarj süresi:",
|
||||
timeToRechargeValue: "{0} dk {1} sn",
|
||||
},
|
||||
chargerPayment: {
|
||||
title: "ÖDEME YÖNTEMİ",
|
||||
money: "NAKİT",
|
||||
bank: "BANKA",
|
||||
payButton: "{0} ÖDE",
|
||||
},
|
||||
continueButton: "DEVAM",
|
||||
outOfStock: "Stokta yok",
|
||||
},
|
||||
rechargerDisplay: {
|
||||
title: "ŞARJ EDİLİYOR...",
|
||||
remainingTimeText: "KALAN SÜRE",
|
||||
remainingTimeValue: "{0} dk {1} sn",
|
||||
},
|
||||
fuelConsumptionChart: {
|
||||
title: "Yakıt tüketim grafiği",
|
||||
chartLabels: {
|
||||
fuel: "Yakıt (%)",
|
||||
speed: "Hız (km/s)",
|
||||
consumption: "Tüketim (L/s)",
|
||||
shortSeconds: "{0}s",
|
||||
},
|
||||
footer: {
|
||||
focus: "Odağı değiştirmek için F3",
|
||||
toggleRecording: "Kaydı Aç/Kapat",
|
||||
recordsLength: "Geçmiş Uzunluğu ({0}s)",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -1,85 +1,85 @@
|
|||
if (Lang == undefined) {
|
||||
var Lang = [];
|
||||
}
|
||||
Lang["zh-cn"] = {
|
||||
pumpInterface: {
|
||||
stationStock: "{0} 升(L)",
|
||||
vehicleFuel: "{0} 升(L)",
|
||||
confirm: "确认",
|
||||
vehicleFuelTooltip: "当前燃料 / 油箱容量",
|
||||
fuelTypes: {
|
||||
regular: "92号燃油",
|
||||
plus: "95号燃油",
|
||||
premium: "98号燃油",
|
||||
diesel: "柴油",
|
||||
},
|
||||
},
|
||||
pumpRefuelDisplay: {
|
||||
liters: "升(L)",
|
||||
carTank: "车辆油箱",
|
||||
remaining: "剩余容量",
|
||||
},
|
||||
confirmRefuelModal: {
|
||||
title: "加油确认",
|
||||
description: "您正在为车牌号 {2} 的车辆补充 {0} 升 {1} 类燃油",
|
||||
paymentBank: "银行结算",
|
||||
paymentCash: "现金结算",
|
||||
},
|
||||
confirmBuyJerryCanModal: {
|
||||
title: "确认购买",
|
||||
paymentBank: "银行结算",
|
||||
paymentCash: "现金结算",
|
||||
},
|
||||
confirmFuelChangeModal: {
|
||||
title: "燃油类型变更提示",
|
||||
description: "⚠️ 更换燃油种类前请确保油箱完全排空",
|
||||
},
|
||||
electricInterface: {
|
||||
chargerType: {
|
||||
title: "充电规格选择",
|
||||
fast: {
|
||||
title: "极速充电",
|
||||
power: "220kW",
|
||||
},
|
||||
normal: {
|
||||
title: "标准充电",
|
||||
power: "100kW",
|
||||
},
|
||||
pricePerKWh: "{0}/kWh",
|
||||
},
|
||||
chargerAmount: {
|
||||
title: "充电金额设定",
|
||||
typeSelected: "充电桩 {0} 台",
|
||||
placeholder: "输入金额",
|
||||
timeToRechargeText: "预计充电时长:",
|
||||
timeToRechargeValue: "{0} 分 {1} 秒",
|
||||
},
|
||||
chargerPayment: {
|
||||
title: "支付方式选择",
|
||||
money: "现金结算",
|
||||
bank: "银行解锁",
|
||||
payButton: "支付 {0}",
|
||||
},
|
||||
continueButton: "下一步",
|
||||
outOfStock: "库存不足",
|
||||
},
|
||||
rechargerDisplay: {
|
||||
title: "充电中...",
|
||||
remainingTimeText: "剩余充电时间",
|
||||
remainingTimeValue: "{0} 分 {1} 秒",
|
||||
},
|
||||
fuelConsumptionChart: {
|
||||
title: "燃料消耗图表",
|
||||
chartLabels: {
|
||||
fuel: "燃料 (%)",
|
||||
speed: "速度 (km/h)",
|
||||
consumption: "消耗 (L/s)",
|
||||
shortSeconds: "{0}秒",
|
||||
},
|
||||
footer: {
|
||||
focus: "按F3切换焦点",
|
||||
toggleRecording: "切换录制",
|
||||
recordsLength: "历史长度({0}秒)",
|
||||
},
|
||||
},
|
||||
if (Lang == undefined) {
|
||||
var Lang = [];
|
||||
}
|
||||
Lang["zh-cn"] = {
|
||||
pumpInterface: {
|
||||
stationStock: "{0} 升(L)",
|
||||
vehicleFuel: "{0} 升(L)",
|
||||
confirm: "确认",
|
||||
vehicleFuelTooltip: "当前燃料 / 油箱容量",
|
||||
fuelTypes: {
|
||||
regular: "92号燃油",
|
||||
plus: "95号燃油",
|
||||
premium: "98号燃油",
|
||||
diesel: "柴油",
|
||||
},
|
||||
},
|
||||
pumpRefuelDisplay: {
|
||||
liters: "升(L)",
|
||||
carTank: "车辆油箱",
|
||||
remaining: "剩余容量",
|
||||
},
|
||||
confirmRefuelModal: {
|
||||
title: "加油确认",
|
||||
description: "您正在为车牌号 {2} 的车辆补充 {0} 升 {1} 类燃油",
|
||||
paymentBank: "银行结算",
|
||||
paymentCash: "现金结算",
|
||||
},
|
||||
confirmBuyJerryCanModal: {
|
||||
title: "确认购买",
|
||||
paymentBank: "银行结算",
|
||||
paymentCash: "现金结算",
|
||||
},
|
||||
confirmFuelChangeModal: {
|
||||
title: "燃油类型变更提示",
|
||||
description: "⚠️ 更换燃油种类前请确保油箱完全排空",
|
||||
},
|
||||
electricInterface: {
|
||||
chargerType: {
|
||||
title: "充电规格选择",
|
||||
fast: {
|
||||
title: "极速充电",
|
||||
power: "220kW",
|
||||
},
|
||||
normal: {
|
||||
title: "标准充电",
|
||||
power: "100kW",
|
||||
},
|
||||
pricePerKWh: "{0}/kWh",
|
||||
},
|
||||
chargerAmount: {
|
||||
title: "充电金额设定",
|
||||
typeSelected: "充电桩 {0} 台",
|
||||
placeholder: "输入金额",
|
||||
timeToRechargeText: "预计充电时长:",
|
||||
timeToRechargeValue: "{0} 分 {1} 秒",
|
||||
},
|
||||
chargerPayment: {
|
||||
title: "支付方式选择",
|
||||
money: "现金结算",
|
||||
bank: "银行解锁",
|
||||
payButton: "支付 {0}",
|
||||
},
|
||||
continueButton: "下一步",
|
||||
outOfStock: "库存不足",
|
||||
},
|
||||
rechargerDisplay: {
|
||||
title: "充电中...",
|
||||
remainingTimeText: "剩余充电时间",
|
||||
remainingTimeValue: "{0} 分 {1} 秒",
|
||||
},
|
||||
fuelConsumptionChart: {
|
||||
title: "燃料消耗图表",
|
||||
chartLabels: {
|
||||
fuel: "燃料 (%)",
|
||||
speed: "速度 (km/h)",
|
||||
consumption: "消耗 (L/s)",
|
||||
shortSeconds: "{0}秒",
|
||||
},
|
||||
footer: {
|
||||
focus: "按F3切换焦点",
|
||||
toggleRecording: "切换录制",
|
||||
recordsLength: "历史长度({0}秒)",
|
||||
},
|
||||
},
|
||||
};
|
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
|
@ -1,279 +1,279 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
|
||||
<!-- Google Fonts -->
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Lexend+Zetta:wght@100..900&family=Lexend:wght@100..900&display=swap" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Montserrat&display=swap" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700&display=swap" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Lexend+Zetta:wght@100..900&family=Lexend:wght@100..900&display=swap" rel="stylesheet">
|
||||
|
||||
<!-- jQuery -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script>
|
||||
<script src="https://code.jquery.com/ui/1.14.1/jquery-ui.min.js"></script>
|
||||
|
||||
<!-- Stylesheets -->
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
|
||||
<!-- Chart JS -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.1"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/luxon@1.27.0"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chartjs-adapter-luxon@1.0.0"></script>
|
||||
<script src="scripts/chartjs-plugin-streaming@2.0.0"></script>
|
||||
|
||||
<!-- Utils JavaScript -->
|
||||
<script src="https://cfx-nui-lc_utils/nui/index.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="https://cfx-nui-lc_utils/nui/css/tooltip.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="gas-pump-container" class="gas-pump-container" style="display: none; zoom: 100%; overflow: hidden;">
|
||||
<img id="gas-pump-container-image" src="images/gas_pump.png" alt="background" width="1920">
|
||||
<div class="gas-pump-interactive-button" onclick="openBuyJerryCanModal()">
|
||||
<div class="gas-pump-interactive-inner-button"></div>
|
||||
</div>
|
||||
<div class="gas-pump-elements-container">
|
||||
<div class="gas-pump-values-container">
|
||||
<div class="controls-container">
|
||||
<div></div>
|
||||
<button onclick="increaseZoom()">+</button>
|
||||
<button onclick="decreaseZoom()">-</button>
|
||||
<!-- <button>?</button> -->
|
||||
</div>
|
||||
<div></div>
|
||||
<div class="amount-display-container">
|
||||
<span class="digital-text dark price-per-liter"></span>
|
||||
<div class="quantity-input-container">
|
||||
<button class="refuel-sub">-</button>
|
||||
<input id="input-fuel-amount" class="digital-text" type="text" value="1">
|
||||
<button class="refuel-add">+</button>
|
||||
</div>
|
||||
<div class="stock-values-container">
|
||||
<span class="digital-text station-stock"></span>
|
||||
<span data-tooltip-location="bottom" data-tooltip="" class="digital-text vehicle-fuel"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="money-display-container">
|
||||
<span class="digital-text-2 bank-balance"></span>
|
||||
<span class="digital-text-2 cash-balance"></span>
|
||||
<button class="confirm-button" onclick="confirmRefuel()"></button>
|
||||
</div>
|
||||
<div></div>
|
||||
</div>
|
||||
<div class="gas-pump-fuel-list-container">
|
||||
<button class="fuel-type-button regular" onclick="changeSelectedFuelType('regular')"></button>
|
||||
<button class="fuel-type-button plus" onclick="changeSelectedFuelType('plus')"></button>
|
||||
<button class="fuel-type-button premium" onclick="changeSelectedFuelType('premium')"></button>
|
||||
<button class="fuel-type-button diesel" onclick="changeSelectedFuelType('diesel')"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="refuel-display" class="refuel-display-body" style="display: none;">
|
||||
<div class="refuel-display-container">
|
||||
<div class="refuel-display-info-container" style="margin-top: 12px; margin-right: 5px;">
|
||||
<span class="refuel-display-label" id="refuel-display-car-label"></span>
|
||||
<div>
|
||||
<span class="refuel-display-value" id="refuel-display-car-value"></span>
|
||||
<small class="refuel-display-liters"></small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="refuel-display-info-container" style="margin-top: 9px; margin-right: 5px;">
|
||||
<span class="refuel-display-label" id="refuel-display-pump-label"></span>
|
||||
<div>
|
||||
<span class="refuel-display-value" id="refuel-display-pump-value"></span>
|
||||
<small class="refuel-display-liters"></small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="recharge-display" class="recharge-display-body" style="display: none;">
|
||||
<div class="recharge-display-container">
|
||||
<div class="recharge-display-title-container">
|
||||
<h3 id="recharge-display-title"></h3>
|
||||
</div>
|
||||
<div class="recharge-display-battery-container">
|
||||
<span id="recharge-display-battery-level-span" style="width: 35px;"></span>
|
||||
<div class="recharge-display-battery-bar-container">
|
||||
<div class="recharge-display-battery-level">
|
||||
<div id="recharge-display-battery-liquid" class="recharge-display-battery-liquid" style="width: 100%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="recharge-display-remaining-time-container">
|
||||
<span id="recharge-display-remaining-time-title" class="recharge-display-remaining-time-title"></span>
|
||||
<span id="recharge-display-remaining-time-value" class="recharge-display-remaining-time-value"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="electric-charger-container" class="electric-charger-container" style="display: none; zoom: 100%; overflow: hidden;">
|
||||
<img src="images/electric_charger.png" alt="background" width="1920">
|
||||
<div class="electric-charger-elements-container">
|
||||
<div class="electric-charger-type-container" style="display: none;">
|
||||
<h5 id="electric-charger-type-title" class="electric-charger-title"></h5>
|
||||
<section class="electric-charger-buttons-container">
|
||||
<div id="electric-charger-fast-label-wrapper">
|
||||
<input class="electric-charger-type-input" type="radio" id="charger-type-fast" name="charger-type" value="fast" checked>
|
||||
<label id="electric-charger-fast-label" class="electric-charger-type-label" for="charger-type-fast">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="49" height="49" viewBox="0 0 49 49" fill="#ffee00d8"><path d="M18.7644 47C18.5131 47.0002 18.2647 46.9454 18.0369 46.8394C17.809 46.7334 17.6071 46.5788 17.4454 46.3864C17.2837 46.194 17.166 45.9685 17.1007 45.7259C17.0355 45.4832 17.0241 45.2291 17.0675 44.9816V44.9712L19.7028 30.5H9.5C9.2168 30.5 8.9394 30.4198 8.69987 30.2687C8.46034 30.1176 8.26849 29.9018 8.14649 29.6462C8.02449 29.3906 7.97733 29.1057 8.01047 28.8245C8.04361 28.5432 8.15569 28.2771 8.33375 28.0569L28.8809 2.65625C29.1148 2.35936 29.4395 2.14725 29.8053 2.05235C30.1712 1.95745 30.558 1.98498 30.9067 2.13074C31.2554 2.27649 31.5468 2.53245 31.7363 2.85946C31.9257 3.18647 32.0029 3.56655 31.9559 3.94156C31.9559 3.96968 31.9484 3.99687 31.9437 4.025L29.2991 18.5H39.5C39.7832 18.5 40.0606 18.5802 40.3001 18.7313C40.5397 18.8824 40.7315 19.0982 40.8535 19.3538C40.9755 19.6094 41.0227 19.8943 40.9895 20.1755C40.9564 20.4568 40.8443 20.7229 40.6663 20.9431L20.1163 46.3438C19.9548 46.5478 19.7494 46.7127 19.5153 46.8264C19.2812 46.94 19.0246 46.9993 18.7644 47Z"/></svg>
|
||||
<h2 id="electric-charger-type-fast"></h2>
|
||||
<div style="display: flex;flex-direction: column;">
|
||||
<div class="electric-charger-type-label-item-container">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M96 0C78.3 0 64 14.3 64 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM288 0c-17.7 0-32 14.3-32 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l0 32c0 77.4 55 142 128 156.8l0 67.2c0 17.7 14.3 32 32 32s32-14.3 32-32l0-67.2c12.3-2.5 24.1-6.4 35.1-11.5c-2.1-10.8-3.1-21.9-3.1-33.3c0-80.3 53.8-148 127.3-169.2c.5-2.2 .7-4.5 .7-6.8c0-17.7-14.3-32-32-32L32 160zM432 512a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm47.9-225c4.3 3.7 5.4 9.9 2.6 14.9L452.4 356l35.6 0c5.2 0 9.8 3.3 11.4 8.2s-.1 10.3-4.2 13.4l-96 72c-4.5 3.4-10.8 3.2-15.1-.6s-5.4-9.9-2.6-14.9L411.6 380 376 380c-5.2 0-9.8-3.3-11.4-8.2s.1-10.3 4.2-13.4l96-72c4.5-3.4 10.8-3.2 15.1 .6z"/></svg>
|
||||
<span id="electric-charger-type-label-item-fast-power"></span>
|
||||
</div>
|
||||
<div class="electric-charger-type-label-item-container">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M0 112.5L0 422.3c0 18 10.1 35 27 41.3c87 32.5 174 10.3 261-11.9c79.8-20.3 159.6-40.7 239.3-18.9c23 6.3 48.7-9.5 48.7-33.4l0-309.9c0-18-10.1-35-27-41.3C462 15.9 375 38.1 288 60.3C208.2 80.6 128.4 100.9 48.7 79.1C25.6 72.8 0 88.6 0 112.5zM288 352c-44.2 0-80-43-80-96s35.8-96 80-96s80 43 80 96s-35.8 96-80 96zM64 352c35.3 0 64 28.7 64 64l-64 0 0-64zm64-208c0 35.3-28.7 64-64 64l0-64 64 0zM512 304l0 64-64 0c0-35.3 28.7-64 64-64zM448 96l64 0 0 64c-35.3 0-64-28.7-64-64z"/></svg>
|
||||
<span id="electric-charger-type-label-item-fast-price"></span>
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
<div id="electric-charger-normal-label-wrapper">
|
||||
<input class="electric-charger-type-input" type="radio" id="charger-type-normal" name="charger-type" value="normal">
|
||||
<label id="electric-charger-normal-label" class="electric-charger-type-label" for="charger-type-normal">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="43" height="43" viewBox="0 0 43 43" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M16.125 2.49554C16.125 1.22331 15.0936 0.191971 13.8214 0.191971C12.5492 0.191971 11.5179 1.22331 11.5179 2.49554V10.846H9.21429C7.518 10.846 6.14286 12.2211 6.14286 13.9174V23.1317C6.14286 28.2206 10.2682 32.3458 15.3571 32.3458H19.1964V40.6006C19.1964 41.8728 20.2278 42.9042 21.5 42.9042C22.7722 42.9042 23.8036 41.8728 23.8036 40.6006V32.3458H27.6429C32.7319 32.3458 36.8571 28.2206 36.8571 23.1317V13.9174C36.8571 12.2211 35.4821 10.846 33.7857 10.846H31.4821V2.49554C31.4821 1.22331 30.4508 0.191971 29.1786 0.191971C27.9064 0.191971 26.875 1.22331 26.875 2.49554V10.846H16.125V2.49554Z" fill="white"/></svg>
|
||||
<h2 id="electric-charger-type-normal"></h2>
|
||||
<div style="display: flex;flex-direction: column;">
|
||||
<div class="electric-charger-type-label-item-container">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M96 0C78.3 0 64 14.3 64 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM288 0c-17.7 0-32 14.3-32 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l0 32c0 77.4 55 142 128 156.8l0 67.2c0 17.7 14.3 32 32 32s32-14.3 32-32l0-67.2c12.3-2.5 24.1-6.4 35.1-11.5c-2.1-10.8-3.1-21.9-3.1-33.3c0-80.3 53.8-148 127.3-169.2c.5-2.2 .7-4.5 .7-6.8c0-17.7-14.3-32-32-32L32 160zM432 512a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm47.9-225c4.3 3.7 5.4 9.9 2.6 14.9L452.4 356l35.6 0c5.2 0 9.8 3.3 11.4 8.2s-.1 10.3-4.2 13.4l-96 72c-4.5 3.4-10.8 3.2-15.1-.6s-5.4-9.9-2.6-14.9L411.6 380 376 380c-5.2 0-9.8-3.3-11.4-8.2s.1-10.3 4.2-13.4l96-72c4.5-3.4 10.8-3.2 15.1 .6z"/></svg>
|
||||
<span id="electric-charger-type-label-item-normal-power"></span>
|
||||
</div>
|
||||
<div class="electric-charger-type-label-item-container">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M0 112.5L0 422.3c0 18 10.1 35 27 41.3c87 32.5 174 10.3 261-11.9c79.8-20.3 159.6-40.7 239.3-18.9c23 6.3 48.7-9.5 48.7-33.4l0-309.9c0-18-10.1-35-27-41.3C462 15.9 375 38.1 288 60.3C208.2 80.6 128.4 100.9 48.7 79.1C25.6 72.8 0 88.6 0 112.5zM288 352c-44.2 0-80-43-80-96s35.8-96 80-96s80 43 80 96s-35.8 96-80 96zM64 352c35.3 0 64 28.7 64 64l-64 0 0-64zm64-208c0 35.3-28.7 64-64 64l0-64 64 0zM512 304l0 64-64 0c0-35.3 28.7-64 64-64zM448 96l64 0 0 64c-35.3 0-64-28.7-64-64z"/></svg>
|
||||
<span id="electric-charger-type-label-item-normal-price"></span>
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
</section>
|
||||
<button id="electric-charger-continue-type-button" class="electric-charger-button" onclick="chargerTypeContinue()"></button>
|
||||
</div>
|
||||
|
||||
<div class="electric-charger-amount-container" style="display: none;">
|
||||
<div onclick="chargerAmountReturn()" class="electric-charger-return-container">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"/></svg>
|
||||
</div>
|
||||
<h5 id="electric-charger-amount-title" class="electric-charger-title" style="margin-bottom: 0;"></h5>
|
||||
<h5 id="electric-charger-amount-type-selected" class="electric-charger-subtitle"></h5>
|
||||
<div class="electric-charger-amount-input-container">
|
||||
<button class="recharge-sub">-</button>
|
||||
<input id="electric-charger-amount-input" class="electric-charger-amount-input" type="number" placeholder="" value="1">
|
||||
<button class="recharge-add">+</button>
|
||||
</div>
|
||||
<div class="electric-amount-info-container">
|
||||
<div class="electric-amount-progress-container">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" fill="white" viewBox="0 0 512 512"><path d="M135.2 117.4L109.1 192l293.8 0-26.1-74.6C372.3 104.6 360.2 96 346.6 96L165.4 96c-13.6 0-25.7 8.6-30.2 21.4zM39.6 196.8L74.8 96.3C88.3 57.8 124.6 32 165.4 32l181.2 0c40.8 0 77.1 25.8 90.6 64.3l35.2 100.5c23.2 9.6 39.6 32.5 39.6 59.2l0 144 0 48c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32l0-48L96 400l0 48c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32l0-48L0 256c0-26.7 16.4-49.6 39.6-59.2zM128 288a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm288 32a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"/></svg>
|
||||
<div class="recharge-display-battery-bar-container">
|
||||
<div class="recharge-display-battery-level">
|
||||
<div id="electric-amount-progress-bar" class="recharge-display-battery-liquid" style="width: 100%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span id="electric-time-to-recharge" class="electric-time-to-recharge"><span id="electric-time-to-recharge-value"></span></span>
|
||||
</div>
|
||||
<button id="electric-charger-continue-amount-button" class="electric-charger-button" onclick="chargerAmountContinue()"></button>
|
||||
</div>
|
||||
|
||||
<div class="electric-charger-payment-container" style="display: none;">
|
||||
<div onclick="chargerPaymentReturn()" class="electric-charger-return-container">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"/></svg>
|
||||
</div>
|
||||
<h5 id="electric-charger-payment-title" class="electric-charger-title"></h5>
|
||||
<section class="electric-charger-buttons-container">
|
||||
<div>
|
||||
<input class="electric-charger-type-input" type="radio" id="charger-payment-money" name="charger-payment" value="account1" checked>
|
||||
<label class="electric-charger-type-label" for="charger-payment-money">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="35" height="35" viewBox="0 0 35 35" fill="none"><path d="M19.0313 23.6982H16.2897C14.3501 23.6982 12.7605 22.0649 12.7605 20.0524C12.7605 19.4545 13.2563 18.9586 13.8542 18.9586C14.4522 18.9586 14.948 19.4545 14.948 20.0524C14.948 20.8545 15.5459 21.5107 16.2897 21.5107H19.0313C19.6001 21.5107 20.0522 21.0003 20.0522 20.3732C20.0522 19.5857 19.8334 19.469 19.3376 19.294L14.948 17.7628C14.0147 17.4274 12.7605 16.7565 12.7605 14.6128C12.7605 12.7899 14.2043 11.2878 15.9688 11.2878H18.7105C20.6501 11.2878 22.2397 12.9212 22.2397 14.9336C22.2397 15.5315 21.7438 16.0274 21.1459 16.0274C20.548 16.0274 20.0522 15.5315 20.0522 14.9336C20.0522 14.1316 19.4542 13.4753 18.7105 13.4753H15.9688C15.4001 13.4753 14.948 13.9858 14.948 14.6128C14.948 15.4003 15.1667 15.517 15.6626 15.692L20.0522 17.2232C20.9855 17.5586 22.2397 18.2295 22.2397 20.3732C22.2397 22.2107 20.7959 23.6982 19.0313 23.6982Z" fill="white"/><path d="M17.5 25.1562C16.9021 25.1562 16.4062 24.6604 16.4062 24.0625V10.9375C16.4062 10.3396 16.9021 9.84375 17.5 9.84375C18.0979 9.84375 18.5938 10.3396 18.5938 10.9375V24.0625C18.5938 24.6604 18.0979 25.1562 17.5 25.1562Z" fill="white"/><path d="M17.5001 33.1771C8.85216 33.1771 1.823 26.1479 1.823 17.5C1.823 8.85209 8.85216 1.82292 17.5001 1.82292C18.098 1.82292 18.5938 2.31876 18.5938 2.91667C18.5938 3.51459 18.098 4.01042 17.5001 4.01042C10.0626 4.01042 4.0105 10.0625 4.0105 17.5C4.0105 24.9375 10.0626 30.9896 17.5001 30.9896C24.9376 30.9896 30.9897 24.9375 30.9897 17.5C30.9897 16.9021 31.4855 16.4063 32.0834 16.4063C32.6813 16.4063 33.1772 16.9021 33.1772 17.5C33.1772 26.1479 26.148 33.1771 17.5001 33.1771Z" fill="white"/><path d="M32.0833 9.84375C31.4854 9.84375 30.9896 9.34792 30.9896 8.75V4.01042H26.25C25.6521 4.01042 25.1562 3.51459 25.1562 2.91667C25.1562 2.31876 25.6521 1.82292 26.25 1.82292H32.0833C32.6812 1.82292 33.1771 2.31876 33.1771 2.91667V8.75C33.1771 9.34792 32.6812 9.84375 32.0833 9.84375Z" fill="white"/><path d="M24.791 11.302C24.5139 11.302 24.2369 11.1999 24.0181 10.9812C23.5952 10.5582 23.5952 9.85825 24.0181 9.43533L31.3098 2.14366C31.7327 1.72075 32.4327 1.72075 32.8556 2.14366C33.2785 2.56658 33.2785 3.26658 32.8556 3.6895L25.5639 10.9812C25.3452 11.1999 25.0681 11.302 24.791 11.302Z" fill="white"/></svg>
|
||||
<h2 id="electric-charger-payment-money"></h2>
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<input class="electric-charger-type-input" type="radio" id="charger-payment-bank" name="charger-payment" value="account2">
|
||||
<label class="electric-charger-type-label" for="charger-payment-bank">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="35" height="35" viewBox="0 0 35 35" fill="none"><path d="M2.91675 11.6667V17.5015H4.37508V26.25H2.91675V30.625H4.37508H8.75008H11.6667H16.0417H18.9584H23.3334H26.2501L30.6251 30.6265L32.0834 30.625V26.25H30.6251V17.5015H32.0834V11.6667L17.5001 2.91667L2.91675 11.6667ZM8.75008 26.25V17.5015H11.6667V26.25H8.75008ZM16.0417 26.25V17.5015H18.9584V26.25H16.0417ZM26.2501 26.25H23.3334V17.5015H26.2501V26.25ZM20.4167 11.6667C20.4167 13.2767 19.1101 14.5833 17.5001 14.5833C15.8901 14.5833 14.5834 13.2767 14.5834 11.6667C14.5834 10.0567 15.8901 8.75001 17.5001 8.75001C19.1101 8.75001 20.4167 10.0567 20.4167 11.6667Z" fill="white"/></svg>
|
||||
<h2 id="electric-charger-payment-bank"></h2>
|
||||
</label>
|
||||
</div>
|
||||
</section>
|
||||
<button id="electric-charger-pay-button" class="electric-charger-button" onclick="confirmRecharge()"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="confirm-refuel-payment-modal" class="modal" style="display: none;">
|
||||
<div class="modal-content">
|
||||
<span class="close-button" onclick="closeModal()">×</span>
|
||||
<h2 id="confirm-refuel-payment-modal-title"></h2>
|
||||
<p id="confirm-refuel-payment-modal-desc"></p>
|
||||
<div class="modal-buttons">
|
||||
<button id="confirm-refuel-payment-modal-pay-bank" class="modal-button" onclick="confirmRefuelPayment('account2')"></button>
|
||||
<button id="confirm-refuel-payment-modal-pay-cash" class="modal-button" onclick="confirmRefuelPayment('account1')"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="confirm-jerry-can-payment-modal" class="modal" style="display: none;">
|
||||
<div class="modal-content">
|
||||
<span class="close-button" onclick="closeModal()">×</span>
|
||||
<h2 id="confirm-jerry-can-payment-modal-title"></h2>
|
||||
<img src="images/jerry_can.png" style="width: 140px;">
|
||||
<h3 id="confirm-jerry-can-payment-modal-desc"></h3>
|
||||
<div class="modal-buttons">
|
||||
<button id="confirm-jerry-can-payment-modal-pay-bank" class="modal-button" onclick="confirmJerryCanPayment('account2')"></button>
|
||||
<button id="confirm-jerry-can-payment-modal-pay-cash" class="modal-button" onclick="confirmJerryCanPayment('account1')"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="confirm-fuel-type-modal" class="modal" style="display: none;">
|
||||
<div class="modal-content">
|
||||
<span class="close-button" onclick="closeModal()">×</span>
|
||||
<h2 id="confirm-fuel-type-modal-title"></h2>
|
||||
<p id="confirm-fuel-type-modal-desc"></p>
|
||||
<div class="modal-buttons">
|
||||
<button id="confirm-fuel-type-modal-confirm" class="modal-button" onclick="changeVehicleFuelType()"></button>
|
||||
<button id="confirm-fuel-type-modal-cancel" class="modal-button cancel-button" onclick="closeModal()"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="chart-dialog" class="chart-dialog" style="display: none;">
|
||||
<span class="close-button" onclick="closeFuelConsumptionChartUI()">×</span>
|
||||
<div class="dialog-header" id="chart-dialog-title">
|
||||
</div>
|
||||
<div class="dialog-body">
|
||||
<canvas id="fuel-chart"></canvas>
|
||||
</div>
|
||||
<div class="dialog-body">
|
||||
<canvas id="speed-chart"></canvas>
|
||||
</div>
|
||||
<div class="dialog-body">
|
||||
<canvas id="consumption-chart"></canvas>
|
||||
</div>
|
||||
<div class="dialog-footer">
|
||||
<div class="dialog-footer-inputs">
|
||||
<div>
|
||||
<input type="checkbox" id="start-stop-recording">
|
||||
<label id="start-stop-recording-label" for="start-stop-recording"></label>
|
||||
</div>
|
||||
<div class="chart-recording-input-container">
|
||||
<button class="decrease-chart-recording" id="decrease-chart-recording">
|
||||
-
|
||||
</button>
|
||||
<span id="stepper-chart-recording-input"></span>
|
||||
<button class="increase-chart-recording" id="increase-chart-recording">
|
||||
+
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<span id="chart-dialog-footer-text"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="panel.js" type="text/javascript"></script>
|
||||
</body>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
|
||||
<!-- Google Fonts -->
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Lexend+Zetta:wght@100..900&family=Lexend:wght@100..900&display=swap" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Montserrat&display=swap" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700&display=swap" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Lexend+Zetta:wght@100..900&family=Lexend:wght@100..900&display=swap" rel="stylesheet">
|
||||
|
||||
<!-- jQuery -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script>
|
||||
<script src="https://code.jquery.com/ui/1.14.1/jquery-ui.min.js"></script>
|
||||
|
||||
<!-- Stylesheets -->
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
|
||||
<!-- Chart JS -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.1"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/luxon@1.27.0"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chartjs-adapter-luxon@1.0.0"></script>
|
||||
<script src="scripts/chartjs-plugin-streaming@2.0.0"></script>
|
||||
|
||||
<!-- Utils JavaScript -->
|
||||
<script src="https://cfx-nui-lc_utils/nui/index.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="https://cfx-nui-lc_utils/nui/css/tooltip.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="gas-pump-container" class="gas-pump-container" style="display: none; zoom: 100%; overflow: hidden;">
|
||||
<img id="gas-pump-container-image" src="images/gas_pump.png" alt="background" width="1920">
|
||||
<div class="gas-pump-interactive-button" onclick="openBuyJerryCanModal()">
|
||||
<div class="gas-pump-interactive-inner-button"></div>
|
||||
</div>
|
||||
<div class="gas-pump-elements-container">
|
||||
<div class="gas-pump-values-container">
|
||||
<div class="controls-container">
|
||||
<div></div>
|
||||
<button onclick="increaseZoom()">+</button>
|
||||
<button onclick="decreaseZoom()">-</button>
|
||||
<!-- <button>?</button> -->
|
||||
</div>
|
||||
<div></div>
|
||||
<div class="amount-display-container">
|
||||
<span class="digital-text dark price-per-liter"></span>
|
||||
<div class="quantity-input-container">
|
||||
<button class="refuel-sub">-</button>
|
||||
<input id="input-fuel-amount" class="digital-text" type="text" value="1">
|
||||
<button class="refuel-add">+</button>
|
||||
</div>
|
||||
<div class="stock-values-container">
|
||||
<span class="digital-text station-stock"></span>
|
||||
<span data-tooltip-location="bottom" data-tooltip="" class="digital-text vehicle-fuel"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="money-display-container">
|
||||
<span class="digital-text-2 bank-balance"></span>
|
||||
<span class="digital-text-2 cash-balance"></span>
|
||||
<button class="confirm-button" onclick="confirmRefuel()"></button>
|
||||
</div>
|
||||
<div></div>
|
||||
</div>
|
||||
<div class="gas-pump-fuel-list-container">
|
||||
<button class="fuel-type-button regular" onclick="changeSelectedFuelType('regular')"></button>
|
||||
<button class="fuel-type-button plus" onclick="changeSelectedFuelType('plus')"></button>
|
||||
<button class="fuel-type-button premium" onclick="changeSelectedFuelType('premium')"></button>
|
||||
<button class="fuel-type-button diesel" onclick="changeSelectedFuelType('diesel')"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="refuel-display" class="refuel-display-body" style="display: none;">
|
||||
<div class="refuel-display-container">
|
||||
<div class="refuel-display-info-container" style="margin-top: 12px; margin-right: 5px;">
|
||||
<span class="refuel-display-label" id="refuel-display-car-label"></span>
|
||||
<div>
|
||||
<span class="refuel-display-value" id="refuel-display-car-value"></span>
|
||||
<small class="refuel-display-liters"></small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="refuel-display-info-container" style="margin-top: 9px; margin-right: 5px;">
|
||||
<span class="refuel-display-label" id="refuel-display-pump-label"></span>
|
||||
<div>
|
||||
<span class="refuel-display-value" id="refuel-display-pump-value"></span>
|
||||
<small class="refuel-display-liters"></small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="recharge-display" class="recharge-display-body" style="display: none;">
|
||||
<div class="recharge-display-container">
|
||||
<div class="recharge-display-title-container">
|
||||
<h3 id="recharge-display-title"></h3>
|
||||
</div>
|
||||
<div class="recharge-display-battery-container">
|
||||
<span id="recharge-display-battery-level-span" style="width: 35px;"></span>
|
||||
<div class="recharge-display-battery-bar-container">
|
||||
<div class="recharge-display-battery-level">
|
||||
<div id="recharge-display-battery-liquid" class="recharge-display-battery-liquid" style="width: 100%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="recharge-display-remaining-time-container">
|
||||
<span id="recharge-display-remaining-time-title" class="recharge-display-remaining-time-title"></span>
|
||||
<span id="recharge-display-remaining-time-value" class="recharge-display-remaining-time-value"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="electric-charger-container" class="electric-charger-container" style="display: none; zoom: 100%; overflow: hidden;">
|
||||
<img src="images/electric_charger.png" alt="background" width="1920">
|
||||
<div class="electric-charger-elements-container">
|
||||
<div class="electric-charger-type-container" style="display: none;">
|
||||
<h5 id="electric-charger-type-title" class="electric-charger-title"></h5>
|
||||
<section class="electric-charger-buttons-container">
|
||||
<div id="electric-charger-fast-label-wrapper">
|
||||
<input class="electric-charger-type-input" type="radio" id="charger-type-fast" name="charger-type" value="fast" checked>
|
||||
<label id="electric-charger-fast-label" class="electric-charger-type-label" for="charger-type-fast">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="49" height="49" viewBox="0 0 49 49" fill="#ffee00d8"><path d="M18.7644 47C18.5131 47.0002 18.2647 46.9454 18.0369 46.8394C17.809 46.7334 17.6071 46.5788 17.4454 46.3864C17.2837 46.194 17.166 45.9685 17.1007 45.7259C17.0355 45.4832 17.0241 45.2291 17.0675 44.9816V44.9712L19.7028 30.5H9.5C9.2168 30.5 8.9394 30.4198 8.69987 30.2687C8.46034 30.1176 8.26849 29.9018 8.14649 29.6462C8.02449 29.3906 7.97733 29.1057 8.01047 28.8245C8.04361 28.5432 8.15569 28.2771 8.33375 28.0569L28.8809 2.65625C29.1148 2.35936 29.4395 2.14725 29.8053 2.05235C30.1712 1.95745 30.558 1.98498 30.9067 2.13074C31.2554 2.27649 31.5468 2.53245 31.7363 2.85946C31.9257 3.18647 32.0029 3.56655 31.9559 3.94156C31.9559 3.96968 31.9484 3.99687 31.9437 4.025L29.2991 18.5H39.5C39.7832 18.5 40.0606 18.5802 40.3001 18.7313C40.5397 18.8824 40.7315 19.0982 40.8535 19.3538C40.9755 19.6094 41.0227 19.8943 40.9895 20.1755C40.9564 20.4568 40.8443 20.7229 40.6663 20.9431L20.1163 46.3438C19.9548 46.5478 19.7494 46.7127 19.5153 46.8264C19.2812 46.94 19.0246 46.9993 18.7644 47Z"/></svg>
|
||||
<h2 id="electric-charger-type-fast"></h2>
|
||||
<div style="display: flex;flex-direction: column;">
|
||||
<div class="electric-charger-type-label-item-container">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M96 0C78.3 0 64 14.3 64 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM288 0c-17.7 0-32 14.3-32 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l0 32c0 77.4 55 142 128 156.8l0 67.2c0 17.7 14.3 32 32 32s32-14.3 32-32l0-67.2c12.3-2.5 24.1-6.4 35.1-11.5c-2.1-10.8-3.1-21.9-3.1-33.3c0-80.3 53.8-148 127.3-169.2c.5-2.2 .7-4.5 .7-6.8c0-17.7-14.3-32-32-32L32 160zM432 512a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm47.9-225c4.3 3.7 5.4 9.9 2.6 14.9L452.4 356l35.6 0c5.2 0 9.8 3.3 11.4 8.2s-.1 10.3-4.2 13.4l-96 72c-4.5 3.4-10.8 3.2-15.1-.6s-5.4-9.9-2.6-14.9L411.6 380 376 380c-5.2 0-9.8-3.3-11.4-8.2s.1-10.3 4.2-13.4l96-72c4.5-3.4 10.8-3.2 15.1 .6z"/></svg>
|
||||
<span id="electric-charger-type-label-item-fast-power"></span>
|
||||
</div>
|
||||
<div class="electric-charger-type-label-item-container">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M0 112.5L0 422.3c0 18 10.1 35 27 41.3c87 32.5 174 10.3 261-11.9c79.8-20.3 159.6-40.7 239.3-18.9c23 6.3 48.7-9.5 48.7-33.4l0-309.9c0-18-10.1-35-27-41.3C462 15.9 375 38.1 288 60.3C208.2 80.6 128.4 100.9 48.7 79.1C25.6 72.8 0 88.6 0 112.5zM288 352c-44.2 0-80-43-80-96s35.8-96 80-96s80 43 80 96s-35.8 96-80 96zM64 352c35.3 0 64 28.7 64 64l-64 0 0-64zm64-208c0 35.3-28.7 64-64 64l0-64 64 0zM512 304l0 64-64 0c0-35.3 28.7-64 64-64zM448 96l64 0 0 64c-35.3 0-64-28.7-64-64z"/></svg>
|
||||
<span id="electric-charger-type-label-item-fast-price"></span>
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
<div id="electric-charger-normal-label-wrapper">
|
||||
<input class="electric-charger-type-input" type="radio" id="charger-type-normal" name="charger-type" value="normal">
|
||||
<label id="electric-charger-normal-label" class="electric-charger-type-label" for="charger-type-normal">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="43" height="43" viewBox="0 0 43 43" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M16.125 2.49554C16.125 1.22331 15.0936 0.191971 13.8214 0.191971C12.5492 0.191971 11.5179 1.22331 11.5179 2.49554V10.846H9.21429C7.518 10.846 6.14286 12.2211 6.14286 13.9174V23.1317C6.14286 28.2206 10.2682 32.3458 15.3571 32.3458H19.1964V40.6006C19.1964 41.8728 20.2278 42.9042 21.5 42.9042C22.7722 42.9042 23.8036 41.8728 23.8036 40.6006V32.3458H27.6429C32.7319 32.3458 36.8571 28.2206 36.8571 23.1317V13.9174C36.8571 12.2211 35.4821 10.846 33.7857 10.846H31.4821V2.49554C31.4821 1.22331 30.4508 0.191971 29.1786 0.191971C27.9064 0.191971 26.875 1.22331 26.875 2.49554V10.846H16.125V2.49554Z" fill="white"/></svg>
|
||||
<h2 id="electric-charger-type-normal"></h2>
|
||||
<div style="display: flex;flex-direction: column;">
|
||||
<div class="electric-charger-type-label-item-container">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M96 0C78.3 0 64 14.3 64 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM288 0c-17.7 0-32 14.3-32 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l0 32c0 77.4 55 142 128 156.8l0 67.2c0 17.7 14.3 32 32 32s32-14.3 32-32l0-67.2c12.3-2.5 24.1-6.4 35.1-11.5c-2.1-10.8-3.1-21.9-3.1-33.3c0-80.3 53.8-148 127.3-169.2c.5-2.2 .7-4.5 .7-6.8c0-17.7-14.3-32-32-32L32 160zM432 512a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm47.9-225c4.3 3.7 5.4 9.9 2.6 14.9L452.4 356l35.6 0c5.2 0 9.8 3.3 11.4 8.2s-.1 10.3-4.2 13.4l-96 72c-4.5 3.4-10.8 3.2-15.1-.6s-5.4-9.9-2.6-14.9L411.6 380 376 380c-5.2 0-9.8-3.3-11.4-8.2s.1-10.3 4.2-13.4l96-72c4.5-3.4 10.8-3.2 15.1 .6z"/></svg>
|
||||
<span id="electric-charger-type-label-item-normal-power"></span>
|
||||
</div>
|
||||
<div class="electric-charger-type-label-item-container">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M0 112.5L0 422.3c0 18 10.1 35 27 41.3c87 32.5 174 10.3 261-11.9c79.8-20.3 159.6-40.7 239.3-18.9c23 6.3 48.7-9.5 48.7-33.4l0-309.9c0-18-10.1-35-27-41.3C462 15.9 375 38.1 288 60.3C208.2 80.6 128.4 100.9 48.7 79.1C25.6 72.8 0 88.6 0 112.5zM288 352c-44.2 0-80-43-80-96s35.8-96 80-96s80 43 80 96s-35.8 96-80 96zM64 352c35.3 0 64 28.7 64 64l-64 0 0-64zm64-208c0 35.3-28.7 64-64 64l0-64 64 0zM512 304l0 64-64 0c0-35.3 28.7-64 64-64zM448 96l64 0 0 64c-35.3 0-64-28.7-64-64z"/></svg>
|
||||
<span id="electric-charger-type-label-item-normal-price"></span>
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
</section>
|
||||
<button id="electric-charger-continue-type-button" class="electric-charger-button" onclick="chargerTypeContinue()"></button>
|
||||
</div>
|
||||
|
||||
<div class="electric-charger-amount-container" style="display: none;">
|
||||
<div onclick="chargerAmountReturn()" class="electric-charger-return-container">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"/></svg>
|
||||
</div>
|
||||
<h5 id="electric-charger-amount-title" class="electric-charger-title" style="margin-bottom: 0;"></h5>
|
||||
<h5 id="electric-charger-amount-type-selected" class="electric-charger-subtitle"></h5>
|
||||
<div class="electric-charger-amount-input-container">
|
||||
<button class="recharge-sub">-</button>
|
||||
<input id="electric-charger-amount-input" class="electric-charger-amount-input" type="number" placeholder="" value="1">
|
||||
<button class="recharge-add">+</button>
|
||||
</div>
|
||||
<div class="electric-amount-info-container">
|
||||
<div class="electric-amount-progress-container">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" fill="white" viewBox="0 0 512 512"><path d="M135.2 117.4L109.1 192l293.8 0-26.1-74.6C372.3 104.6 360.2 96 346.6 96L165.4 96c-13.6 0-25.7 8.6-30.2 21.4zM39.6 196.8L74.8 96.3C88.3 57.8 124.6 32 165.4 32l181.2 0c40.8 0 77.1 25.8 90.6 64.3l35.2 100.5c23.2 9.6 39.6 32.5 39.6 59.2l0 144 0 48c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32l0-48L96 400l0 48c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32l0-48L0 256c0-26.7 16.4-49.6 39.6-59.2zM128 288a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm288 32a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"/></svg>
|
||||
<div class="recharge-display-battery-bar-container">
|
||||
<div class="recharge-display-battery-level">
|
||||
<div id="electric-amount-progress-bar" class="recharge-display-battery-liquid" style="width: 100%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span id="electric-time-to-recharge" class="electric-time-to-recharge"><span id="electric-time-to-recharge-value"></span></span>
|
||||
</div>
|
||||
<button id="electric-charger-continue-amount-button" class="electric-charger-button" onclick="chargerAmountContinue()"></button>
|
||||
</div>
|
||||
|
||||
<div class="electric-charger-payment-container" style="display: none;">
|
||||
<div onclick="chargerPaymentReturn()" class="electric-charger-return-container">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"/></svg>
|
||||
</div>
|
||||
<h5 id="electric-charger-payment-title" class="electric-charger-title"></h5>
|
||||
<section class="electric-charger-buttons-container">
|
||||
<div>
|
||||
<input class="electric-charger-type-input" type="radio" id="charger-payment-money" name="charger-payment" value="account1" checked>
|
||||
<label class="electric-charger-type-label" for="charger-payment-money">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="35" height="35" viewBox="0 0 35 35" fill="none"><path d="M19.0313 23.6982H16.2897C14.3501 23.6982 12.7605 22.0649 12.7605 20.0524C12.7605 19.4545 13.2563 18.9586 13.8542 18.9586C14.4522 18.9586 14.948 19.4545 14.948 20.0524C14.948 20.8545 15.5459 21.5107 16.2897 21.5107H19.0313C19.6001 21.5107 20.0522 21.0003 20.0522 20.3732C20.0522 19.5857 19.8334 19.469 19.3376 19.294L14.948 17.7628C14.0147 17.4274 12.7605 16.7565 12.7605 14.6128C12.7605 12.7899 14.2043 11.2878 15.9688 11.2878H18.7105C20.6501 11.2878 22.2397 12.9212 22.2397 14.9336C22.2397 15.5315 21.7438 16.0274 21.1459 16.0274C20.548 16.0274 20.0522 15.5315 20.0522 14.9336C20.0522 14.1316 19.4542 13.4753 18.7105 13.4753H15.9688C15.4001 13.4753 14.948 13.9858 14.948 14.6128C14.948 15.4003 15.1667 15.517 15.6626 15.692L20.0522 17.2232C20.9855 17.5586 22.2397 18.2295 22.2397 20.3732C22.2397 22.2107 20.7959 23.6982 19.0313 23.6982Z" fill="white"/><path d="M17.5 25.1562C16.9021 25.1562 16.4062 24.6604 16.4062 24.0625V10.9375C16.4062 10.3396 16.9021 9.84375 17.5 9.84375C18.0979 9.84375 18.5938 10.3396 18.5938 10.9375V24.0625C18.5938 24.6604 18.0979 25.1562 17.5 25.1562Z" fill="white"/><path d="M17.5001 33.1771C8.85216 33.1771 1.823 26.1479 1.823 17.5C1.823 8.85209 8.85216 1.82292 17.5001 1.82292C18.098 1.82292 18.5938 2.31876 18.5938 2.91667C18.5938 3.51459 18.098 4.01042 17.5001 4.01042C10.0626 4.01042 4.0105 10.0625 4.0105 17.5C4.0105 24.9375 10.0626 30.9896 17.5001 30.9896C24.9376 30.9896 30.9897 24.9375 30.9897 17.5C30.9897 16.9021 31.4855 16.4063 32.0834 16.4063C32.6813 16.4063 33.1772 16.9021 33.1772 17.5C33.1772 26.1479 26.148 33.1771 17.5001 33.1771Z" fill="white"/><path d="M32.0833 9.84375C31.4854 9.84375 30.9896 9.34792 30.9896 8.75V4.01042H26.25C25.6521 4.01042 25.1562 3.51459 25.1562 2.91667C25.1562 2.31876 25.6521 1.82292 26.25 1.82292H32.0833C32.6812 1.82292 33.1771 2.31876 33.1771 2.91667V8.75C33.1771 9.34792 32.6812 9.84375 32.0833 9.84375Z" fill="white"/><path d="M24.791 11.302C24.5139 11.302 24.2369 11.1999 24.0181 10.9812C23.5952 10.5582 23.5952 9.85825 24.0181 9.43533L31.3098 2.14366C31.7327 1.72075 32.4327 1.72075 32.8556 2.14366C33.2785 2.56658 33.2785 3.26658 32.8556 3.6895L25.5639 10.9812C25.3452 11.1999 25.0681 11.302 24.791 11.302Z" fill="white"/></svg>
|
||||
<h2 id="electric-charger-payment-money"></h2>
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<input class="electric-charger-type-input" type="radio" id="charger-payment-bank" name="charger-payment" value="account2">
|
||||
<label class="electric-charger-type-label" for="charger-payment-bank">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="35" height="35" viewBox="0 0 35 35" fill="none"><path d="M2.91675 11.6667V17.5015H4.37508V26.25H2.91675V30.625H4.37508H8.75008H11.6667H16.0417H18.9584H23.3334H26.2501L30.6251 30.6265L32.0834 30.625V26.25H30.6251V17.5015H32.0834V11.6667L17.5001 2.91667L2.91675 11.6667ZM8.75008 26.25V17.5015H11.6667V26.25H8.75008ZM16.0417 26.25V17.5015H18.9584V26.25H16.0417ZM26.2501 26.25H23.3334V17.5015H26.2501V26.25ZM20.4167 11.6667C20.4167 13.2767 19.1101 14.5833 17.5001 14.5833C15.8901 14.5833 14.5834 13.2767 14.5834 11.6667C14.5834 10.0567 15.8901 8.75001 17.5001 8.75001C19.1101 8.75001 20.4167 10.0567 20.4167 11.6667Z" fill="white"/></svg>
|
||||
<h2 id="electric-charger-payment-bank"></h2>
|
||||
</label>
|
||||
</div>
|
||||
</section>
|
||||
<button id="electric-charger-pay-button" class="electric-charger-button" onclick="confirmRecharge()"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="confirm-refuel-payment-modal" class="modal" style="display: none;">
|
||||
<div class="modal-content">
|
||||
<span class="close-button" onclick="closeModal()">×</span>
|
||||
<h2 id="confirm-refuel-payment-modal-title"></h2>
|
||||
<p id="confirm-refuel-payment-modal-desc"></p>
|
||||
<div class="modal-buttons">
|
||||
<button id="confirm-refuel-payment-modal-pay-bank" class="modal-button" onclick="confirmRefuelPayment('account2')"></button>
|
||||
<button id="confirm-refuel-payment-modal-pay-cash" class="modal-button" onclick="confirmRefuelPayment('account1')"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="confirm-jerry-can-payment-modal" class="modal" style="display: none;">
|
||||
<div class="modal-content">
|
||||
<span class="close-button" onclick="closeModal()">×</span>
|
||||
<h2 id="confirm-jerry-can-payment-modal-title"></h2>
|
||||
<img src="images/jerry_can.png" style="width: 140px;">
|
||||
<h3 id="confirm-jerry-can-payment-modal-desc"></h3>
|
||||
<div class="modal-buttons">
|
||||
<button id="confirm-jerry-can-payment-modal-pay-bank" class="modal-button" onclick="confirmJerryCanPayment('account2')"></button>
|
||||
<button id="confirm-jerry-can-payment-modal-pay-cash" class="modal-button" onclick="confirmJerryCanPayment('account1')"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="confirm-fuel-type-modal" class="modal" style="display: none;">
|
||||
<div class="modal-content">
|
||||
<span class="close-button" onclick="closeModal()">×</span>
|
||||
<h2 id="confirm-fuel-type-modal-title"></h2>
|
||||
<p id="confirm-fuel-type-modal-desc"></p>
|
||||
<div class="modal-buttons">
|
||||
<button id="confirm-fuel-type-modal-confirm" class="modal-button" onclick="changeVehicleFuelType()"></button>
|
||||
<button id="confirm-fuel-type-modal-cancel" class="modal-button cancel-button" onclick="closeModal()"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="chart-dialog" class="chart-dialog" style="display: none;">
|
||||
<span class="close-button" onclick="closeFuelConsumptionChartUI()">×</span>
|
||||
<div class="dialog-header" id="chart-dialog-title">
|
||||
</div>
|
||||
<div class="dialog-body">
|
||||
<canvas id="fuel-chart"></canvas>
|
||||
</div>
|
||||
<div class="dialog-body">
|
||||
<canvas id="speed-chart"></canvas>
|
||||
</div>
|
||||
<div class="dialog-body">
|
||||
<canvas id="consumption-chart"></canvas>
|
||||
</div>
|
||||
<div class="dialog-footer">
|
||||
<div class="dialog-footer-inputs">
|
||||
<div>
|
||||
<input type="checkbox" id="start-stop-recording">
|
||||
<label id="start-stop-recording-label" for="start-stop-recording"></label>
|
||||
</div>
|
||||
<div class="chart-recording-input-container">
|
||||
<button class="decrease-chart-recording" id="decrease-chart-recording">
|
||||
-
|
||||
</button>
|
||||
<span id="stepper-chart-recording-input"></span>
|
||||
<button class="increase-chart-recording" id="increase-chart-recording">
|
||||
+
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<span id="chart-dialog-footer-text"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="panel.js" type="text/javascript"></script>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because it is too large
Load diff
|
@ -1 +1 @@
|
|||
1.2.2
|
||||
1.2.3
|
|
@ -10,7 +10,7 @@ return {
|
|||
},
|
||||
-- Kayas
|
||||
{
|
||||
coords = vec4(1556.8286, 3795.1765, 34.1055, 171.1552),
|
||||
coords = vec4(1551.9611, 3801.8198, 33.2521, 29.7248),
|
||||
vehicleSpawn = vec4(1573.0295, 3795.8474, 34.4144, 140.1099),
|
||||
blipName = "Kayas Restaurant"
|
||||
},
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
RoadPods = {}
|
||||
|
||||
RoadPods.Items = {
|
||||
"roadpods",
|
||||
}
|
||||
|
||||
RoadPods.NeedItem = true
|
||||
|
||||
RoadPods.ForceRoadPods = false --If you set this to true, you can not use the Music App without RoadPods.
|
||||
RoadPods = {}
|
||||
|
||||
RoadPods.Items = {
|
||||
"roadpods",
|
||||
}
|
||||
|
||||
RoadPods.NeedItem = true
|
||||
|
||||
RoadPods.ForceRoadPods = false --If you set this to true, you can not use the Music App without RoadPods.
|
||||
RoadPods.ForceRoadPodsLink = true --If you set this to true, you can not use the Music Link Feature without RoadPods.
|
Loading…
Add table
Add a link
Reference in a new issue