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
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load diff
|
|
@ -1 +1 @@
|
|||
1.2.2
|
||||
1.2.3
|
||||
Loading…
Add table
Add a link
Reference in a new issue