Skip to content

Commit

Permalink
feat(Locales, Version Updated)
Browse files Browse the repository at this point in the history
Also, lined out Config.AirAndWaterVehicleFueling[19] due to a confliction issue with Gabz's Trooper PD.
  • Loading branch information
dnelyk committed May 27, 2023
1 parent 8e1475b commit 61064f7
Show file tree
Hide file tree
Showing 9 changed files with 102 additions and 42 deletions.
8 changes: 4 additions & 4 deletions client/station_cl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ if Config.PlayerOwnedGasStationsEnabled then -- This is so Player Owned Gas Stat
}

if SpawnPickupVehicles() then
QBCore.Functions.Notify('Your fuel order is available for pickup! Take a look at your GPS to find the pickup!', 'success')
QBCore.Functions.Notify(Lang:t("fuel_order_ready"), 'success')
SetNewWaypoint(Config.DeliveryTruckSpawns['truck'].x, Config.DeliveryTruckSpawns['truck'].y)
SetUseWaypointAsDestination(true)
ReservePickupData.blip = CreateBlip(vector3(Config.DeliveryTruckSpawns['truck'].x, Config.DeliveryTruckSpawns['truck'].y, Config.DeliveryTruckSpawns['truck'].z), "Truck Pickup")
Expand Down Expand Up @@ -197,7 +197,7 @@ if Config.PlayerOwnedGasStationsEnabled then -- This is so Player Owned Gas Stat
if distBetweenTruckAndTrailer > 10.0 then
distBetweenTruckAndTrailer = nil
if not stopNotifyTemp then
QBCore.Functions.Notify('The trailer is not attached to the truck or is too far!', 'error', 7500)
QBCore.Functions.Notify(Lang:t("trailer_too_far"), 'error', 7500)
end
stopNotifyTemp = true
Wait(1000)
Expand Down Expand Up @@ -260,11 +260,11 @@ if Config.PlayerOwnedGasStationsEnabled then -- This is so Player Owned Gas Stat
else
hasArrivedAtLocation = true
if Config.Ox.DrawText then
lib.showTextUI("[E] Drop Off Truck", {
lib.showTextUI(Lang:t("draw_text_fuel_dropoff"), {
position = 'left-center'
})
else
exports[Config.Core]:DrawText("[E] Drop Off Truck", 'left')
exports[Config.Core]:DrawText(Lang:t("draw_text_fuel_dropoff"), 'left')
end
-- Add Listner for Keypress
AwaitInput()
Expand Down
7 changes: 7 additions & 0 deletions locales/de.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ local Translations = {
cannot_refuel_inside = "Sie können nicht aus dem Fahrzeuginneren tanken!",
vehicle_is_damaged = "Das Fahrzeug ist zu beschädigt zum Tanken!",

-- 2.1.2 -- Reservenabholung ---
fuel_order_ready = "Ihre Kraftstoffbestellung ist abholbereit! Schauen Sie auf Ihrem GPS nach, um die Abholstelle zu finden!",
draw_text_fuel_dropoff = "[E] LKW abstellen",
fuel_pickup_success = "Ihre Reserven wurden aufgefüllt: %sL",
fuel_pickup_failed = "Ron Oil hat gerade den Kraftstoff an Ihre Tankstelle geliefert!",
trailer_too_far = "Der Anhänger ist nicht mit dem LKW verbunden oder zu weit entfernt!",

-- 2.1.0
no_nozzle = "Sie haben keine Zapfpistole!",
vehicle_too_far = "Sie sind zu weit entfernt, um dieses Fahrzeug zu betanken!",
Expand Down
7 changes: 7 additions & 0 deletions locales/ee.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ local Translations = {
need_electric_charger = "Elektri auto jaoks, peaksid sa minema laadimispunkti!",
cannot_refuel_inside = "Sa ei saa tankida sõidukit, kui ise seal sees istud!",

-- 2.1.2 -- Reservi kogumine ---
fuel_order_ready = "Teie kütuse tellimus on saadaval kogumiseks! Vaadake oma GPS-i, et leida kogumiskoht!",
draw_text_fuel_dropoff = "[E] Jäta veok maha",
fuel_pickup_success = "Teie reservuaarid on täidetud: %sL",
fuel_pickup_failed = "Ron Oil on just teie jaama kütust maha toimetanud!",
trailer_too_far = "Haagis pole veokiga ühendatud või on liiga kaugel!",

-- 2.1.0
no_nozzle = "Sul ei ole kütuse otsikut!",
vehicle_is_damaged = "Sõiduk on liiga katki, et seda tankida!",
Expand Down
7 changes: 7 additions & 0 deletions locales/en.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ local Translations = {
need_electric_charger = "I need to go to an electric charger!",
cannot_refuel_inside = "You cannot refuel from inside of the vehicle!",

-- 2.1.2 -- Reserves Pickup ---
fuel_order_ready = "Your fuel order is available for pickup! Take a look at your GPS to find the pickup!",
draw_text_fuel_dropoff = "[E] Drop Off Truck",
fuel_pickup_success = "Your reserves have been filled to: %sL",
fuel_pickup_failed = "Ron Oil has just dropped off the fuel to your station!",
trailer_too_far = "The trailer is not attached to the truck or is too far!",

-- 2.1.0
no_nozzle = "You do not have the nozzle!",
vehicle_is_damaged = "Vehicle is too damaged to refuel!",
Expand Down
9 changes: 8 additions & 1 deletion locales/es.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,20 @@ local Translations = {
cannot_refuel_inside = "No puedes repostar desde el interior del Vehiculo!",
vehicle_is_damaged = "El vehiculo está demasiado dañado para repostarlo!",

-- 2.1.2 -- Recogida de reservas ---
fuel_order_ready = "¡Tu pedido de combustible está disponible para recoger! ¡Consulta tu GPS para encontrar el lugar de recogida!",
draw_text_fuel_dropoff = "[E] Dejar camión",
fuel_pickup_success = "Tus reservas se han llenado con: %sL",
fuel_pickup_failed = "¡Ron Oil acaba de entregar el combustible a tu estación!",
trailer_too_far = "¡El remolque no está enganchado al camión o está demasiado lejos!",

-- 2.1.0
no_nozzle = "¡No tienes la boquilla!",
vehicle_too_far = "¡Estás demasiado lejos para repostar este vehículo!",
inside_vehicle = "¡No puedes repostar desde el interior del vehículo!",
you_are_discount_eligible = "Si entras en servicio, podrías recibir un descuento del "..Config.EmergencyServicesDiscount['discount'].."%!",
no_fuel = "Sin combustible..",

-- Electric
electric_more_than_zero = "Debes cargar mas de 0KW!",
electric_vehicle_not_electric = "Tu vehiculo no es Eléctrico!",
Expand Down
7 changes: 7 additions & 0 deletions locales/fr.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ local Translations = {
cannot_refuel_inside = "Vous ne pouvez pas faire le plein depuis l'intérieur du véhicule!",
vehicle_is_damaged = "Le véhicule est trop endommagé pour faire le plein!",

-- 2.1.2 -- Récupération des réserves ---
fuel_order_ready = "Votre commande de carburant est disponible pour récupération ! Consultez votre GPS pour trouver l'endroit de récupération !",
draw_text_fuel_dropoff = "[E] Déposer le camion",
fuel_pickup_success = "Vos réserves ont été remplies à hauteur de : %sL",
fuel_pickup_failed = "Ron Oil vient de livrer le carburant à votre station !",
trailer_too_far = "La remorque n'est pas attachée au camion ou est trop éloignée !",

-- 2.1.0
no_nozzle = "Vous n'avez pas de buse !",
vehicle_too_far = "Vous êtes trop loin pour ravitailler ce véhicule !",
Expand Down
4 changes: 2 additions & 2 deletions server/station_sv.lua
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ if Config.PlayerOwnedGasStationsEnabled then -- This is so Player Owned Gas Stat
if FuelPickupSent[location] then
local cid = QBCore.Functions.GetPlayer(src).PlayerData.citizenid
MySQL.Async.execute('UPDATE fuel_stations SET fuel = ? WHERE `location` = ?', {FuelPickupSent[location]['refuelAmount'], location})
TriggerClientEvent('QBCore:Notify', src, "Ron Oil has just dropped off the fuel to your station!", 'success')
TriggerClientEvent('QBCore:Notify', src, Lang:t("fuel_pickup_failed"), 'success')
-- This will print player information just in case someone figures out a way to exploit this.
print("User encountered an error with fuel pickup, so we are updating the fuel level anyways, and cancelling the pickup. SQL Execute Update: fuel_station level to: "..FuelPickupSent[location].refuelAmount.. " | Source: "..src.." | Citizen Id: "..cid..".")
FuelPickupSent[location] = nil
Expand All @@ -221,7 +221,7 @@ if Config.PlayerOwnedGasStationsEnabled then -- This is so Player Owned Gas Stat
if FuelPickupSent[location] then
local cid = QBCore.Functions.GetPlayer(src).PlayerData.citizenid
MySQL.Async.execute('UPDATE fuel_stations SET fuel = ? WHERE `location` = ?', {FuelPickupSent[location].refuelAmount, location})
TriggerClientEvent('QBCore:Notify', src, 'Your reserves have been filled to: '..tostring(tonumber(FuelPickupSent[location].refuelAmount)).."L", 'success')
TriggerClientEvent('QBCore:Notify', src, string.format(Lang:t("fuel_pickup_success"), tostring(tonumber(FuelPickupSent[location].refuelAmount))), 'success')
-- This will print player information just in case someone figures out a way to exploit this.
if Config.FuelDebug then
print("User successfully dropped off fuel truck, so we are updating the fuel level and clearing the pickup table. SQL Execute Update: fuel_station level to: "..FuelPickupSent[location].refuelAmount.. " | Source: "..src.." | Citizen Id: "..cid..".")
Expand Down
93 changes: 59 additions & 34 deletions shared/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Config = {}
Config.FuelDebug = false -- Used for debugging, although there are not many areas in yet (Default: false) + Enables Setfuel Commands (0, 50, 100).
Config.PolyDebug = false -- Enables Polyzone Debugging to see PolyZones!
Config.ShowNearestGasStationOnly = true -- When enabled, only the nearest gas stations will be shown on the map.
Config.LeaveEngineRunning = true -- When true, the vehicle's engine will be left running upon exit if the player *HOLDS* F.
Config.LeaveEngineRunning = false -- When true, the vehicle's engine will be left running upon exit if the player *HOLDS* F.
Config.VehicleBlowUp = true -- When true, there will be a configurable chance of the vehicle blowing up, if you fuel while the engine is on.
Config.BlowUpChance = 5 -- Percentage for Chance of Engine Explosion (Default: 5% or 5)
Config.CostMultiplier = 3 -- Amount to multiply 1 by. This indicates fuel price. (Default: $3.0/l or 3.0)
Expand All @@ -12,11 +12,35 @@ Config.FuelDecor = "_FUEL_LEVEL" -- Do not touch! (Default: "_FUEL_LEVEL")
Config.RefuelTime = 600 -- Highly recommended to leave at 600. This value will be multiplied times the amount the player is fueling for the progress bar and cancellation logic! DON'T GO BELOW 250, performance WILL drop!
Config.FuelTargetExport = false -- DO NOT USE WITH OX_TARGET! This is only used to fix this qb-target issue: https://github.com/CodineDev/cdn-fuel/issues/3. <br> <br> If you don't have this issue and haven't installed this exports in qb-target, then this should be false. Otherwise there will be an error.

-- 2.1.1 Update --
Config.OwnersPickupFuel = false -- If an owner buys fuel, they will have to go pick it up at a configured location.
Config.PossibleDeliveryTrucks = {
"hauler",
"phantom",
-- "phantom3", -- This is an fast version of the normal phantom.
"packer",
}
Config.DeliveryTruckSpawns = { -- https://i.imgur.com/VS22i8R.jpeg
['trailer'] = vector4(1724.0, -1649.7, 112.57, 194.24),
['truck'] = vector4(1727.08, -1664.01, 112.62, 189.62),
['PolyZone'] = {
['coords'] = {
vector2(1724.62, -1672.36),
vector2(1719.01, -1648.33),
vector2(1730.99, -1645.62),
vector2(1734.42, -1673.32),
},
['minz'] = 110.0,
['maxz'] = 115.0,
}
}
-- 2.1.1 End

-- 2.1.0 Update
Config.EmergencyServicesDiscount = {
['enabled'] = true, -- Enables Emergency Services Getting a discount based on the value below for Refueling & Electricity Charging Cost
['discount'] = 25, -- % Discount off of price.
['emergency_vehicles_only'] = false, -- Only allows discounts to be applied to Emergency Vehicles
['emergency_vehicles_only'] = true, -- Only allows discounts to be applied to Emergency Vehicles
['ondutyonly'] = true, -- Discount only applies while on duty.
['job'] = {
"police",
Expand All @@ -34,7 +58,7 @@ Config.Ox = {
Progress = false -- Uses Ox ProgressBar instead of progressbar.
}
Config.TargetResource = "qb-target" -- Supported: { 'qb-target', 'ox_target'} -- Others must use the same format as QB-Target or manual configuration is required.
Config.PumpHose = true -- If true, it creates a hose from the pump to the nozzle the client is holding, to give it a more realistic feel.
Config.PumpHose = false -- If true, it creates a hose from the pump to the nozzle the client is holding, to give it a more realistic feel.
Config.RopeType = { -- Options: 1-2-3-4-5; 1: Khaki Color, Kind of Thick, 2: Very Thick Khaki Rope, 3: Very Thick Black Rope, 4: Very Thin Black Rope, 5: Same as 3
['fuel'] = 1,
['electric'] = 1,
Expand Down Expand Up @@ -686,37 +710,38 @@ Config.AirAndWaterVehicleFueling = {
}
},
-- La Mesa Landing Pad (Custom)
[19] = {
['PolyZone'] = {
['coords'] = {
vector2(830.66, -1378.54),
vector2(834.87, -1382.59),
vector2(834.81, -1388.5),
vector2(830.75, -1392.54),
vector2(824.96, -1392.58),
vector2(820.8, -1388.39),
vector2(820.84, -1382.65),
vector2(824.97, -1378.52)
},
['minmax'] = {
['min'] = 35.67,
['max'] = 38.67
},
},
['draw_text'] = "[G] Refuel Aircraft",
['type'] = 'air',
['whitelist'] = {
['enabled'] = false,
['on_duty_only'] = true,
['whitelisted_jobs'] = {
'police', 'ambulance',
}
},
['prop'] = {
['model'] = 'prop_gas_pump_1c',
['coords'] = vector4(827.55, -1378.57, 36.67, 1.11)
}
}
-- Does not work in conjunction with Gabz Trooper PD.
-- [19] = {
-- ['PolyZone'] = {
-- ['coords'] = {
-- vector2(830.66, -1378.54),
-- vector2(834.87, -1382.59),
-- vector2(834.81, -1388.5),
-- vector2(830.75, -1392.54),
-- vector2(824.96, -1392.58),
-- vector2(820.8, -1388.39),
-- vector2(820.84, -1382.65),
-- vector2(824.97, -1378.52)
-- },
-- ['minmax'] = {
-- ['min'] = 35.67,
-- ['max'] = 38.67
-- },
-- },
-- ['draw_text'] = "[G] Refuel Aircraft",
-- ['type'] = 'air',
-- ['whitelist'] = {
-- ['enabled'] = false,
-- ['on_duty_only'] = true,
-- ['whitelisted_jobs'] = {
-- 'police', 'ambulance',
-- }
-- },
-- ['prop'] = {
-- ['model'] = 'prop_gas_pump_1c',
-- ['coords'] = vector4(827.55, -1378.57, 36.67, 1.11)
-- }
-- }
},
['refuel_button'] = 47, -- "G" Button for Draw Text.
['nozzle_length'] = 20.0, -- The max distance you can go from the "Special Pump" before the nozzle in returned to the pump.
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.1
2.1.2

0 comments on commit 61064f7

Please sign in to comment.