From 83bb28658d13b5399786425df56d94e00015e2c8 Mon Sep 17 00:00:00 2001 From: bitpredator <67551273+bitpredator@users.noreply.github.com> Date: Mon, 9 Dec 2024 18:35:48 +0100 Subject: [PATCH] chore: complete the code restructuring work --- .../esx_garage/client/antidespawn.lua | 3 +- .../[esx_addons]/esx_garage/client/main.lua | 1 + .../[esx_addons]/esx_garage/config.lua | 40 ++----------------- .../[esx_addons]/esx_garage/locales/en.lua | 3 +- .../[esx_addons]/esx_garage/locales/it.lua | 3 +- .../[esx_addons]/esx_garage/nui/ui.html | 5 ++- 6 files changed, 12 insertions(+), 43 deletions(-) diff --git a/server-data/resources/[esx_addons]/esx_garage/client/antidespawn.lua b/server-data/resources/[esx_addons]/esx_garage/client/antidespawn.lua index ae18c8b2..b8cb0fb0 100644 --- a/server-data/resources/[esx_addons]/esx_garage/client/antidespawn.lua +++ b/server-data/resources/[esx_addons]/esx_garage/client/antidespawn.lua @@ -1,5 +1,4 @@ -local model, coords, heading -local vehicle = CreateVehicle(model, GetEntityCoords(coords), GetEntityHeading(heading), 1, 0, false, false) +local vehicle SetVehicleNeedsToBeHotwired(vehicle, false) SetVehicleHasBeenOwnedByPlayer(vehicle, true) diff --git a/server-data/resources/[esx_addons]/esx_garage/client/main.lua b/server-data/resources/[esx_addons]/esx_garage/client/main.lua index 33c77bae..50e6e34d 100644 --- a/server-data/resources/[esx_addons]/esx_garage/client/main.lua +++ b/server-data/resources/[esx_addons]/esx_garage/client/main.lua @@ -84,6 +84,7 @@ CreateThread(function() SetBlipAsShortRange(blip, true) BeginTextCommandSetBlipName("STRING") + AddTextComponentSubstringPlayerName(TranslateCap("parking_blip_name")) EndTextCommandSetBlipName(blip) end diff --git a/server-data/resources/[esx_addons]/esx_garage/config.lua b/server-data/resources/[esx_addons]/esx_garage/config.lua index 7c99ac8b..15cf989a 100644 --- a/server-data/resources/[esx_addons]/esx_garage/config.lua +++ b/server-data/resources/[esx_addons]/esx_garage/config.lua @@ -35,9 +35,9 @@ Config.Markers = { Config.Garages = { VespucciBoulevard = { EntryPoint = { - x = -285.2, - y = -886.5, - z = 31.0, + x = 394.865936, + y = -1637.657104, + z = 29.279907, }, Sprite = 357, Scale = 0.8, @@ -64,40 +64,6 @@ Config.Impounds = { Colour = 1, Cost = 3000, }, - PaletoBay = { - GetOutPoint = { - x = -211.4, - y = 6206.5, - z = 31.4, - }, - SpawnPoint = { - x = -204.6, - y = 6221.6, - z = 30.5, - heading = 227.2, - }, - Sprite = 524, - Scale = 0.8, - Colour = 1, - Cost = 3000, - }, - SandyShores = { - GetOutPoint = { - x = 1728.2, - y = 3709.3, - z = 33.2, - }, - SpawnPoint = { - x = 1722.7, - y = 3713.6, - z = 33.2, - heading = 19.9, - }, - Sprite = 524, - Scale = 0.8, - Colour = 1, - Cost = 3000, - }, } exports("getGarages", function() diff --git a/server-data/resources/[esx_addons]/esx_garage/locales/en.lua b/server-data/resources/[esx_addons]/esx_garage/locales/en.lua index 9a165b7f..a0e40e21 100644 --- a/server-data/resources/[esx_addons]/esx_garage/locales/en.lua +++ b/server-data/resources/[esx_addons]/esx_garage/locales/en.lua @@ -1,8 +1,9 @@ Locales["en"] = { + ["parking_blip_name"] = "Garage", ["Impound_blip_name"] = "Impound", ["access_Impound"] = "press [E] to access the impound.", - ["not_owning_veh"] = "You do not own this vehicle!", ["veh_released"] = "Successfully Retrieved Vehicle.", + ["not_owning_veh"] = "You do not own this vehicle!", ["veh_Impound_released"] = "Successfully Retrieved Vehicle From Impound.", ["veh_stored"] = "Successfully Stored Vehicle", ["veh_impounded"] = "Impounded Vehicle", diff --git a/server-data/resources/[esx_addons]/esx_garage/locales/it.lua b/server-data/resources/[esx_addons]/esx_garage/locales/it.lua index 9e39070d..b44213ed 100644 --- a/server-data/resources/[esx_addons]/esx_garage/locales/it.lua +++ b/server-data/resources/[esx_addons]/esx_garage/locales/it.lua @@ -1,8 +1,9 @@ Locales["it"] = { + ["parking_blip_name"] = "Parcheggio del sequestro", ["Impound_blip_name"] = "Sequestro", ["access_Impound"] = "premi [E] per accedere al sequestro.", - ["not_owning_veh"] = "non possiedi questo veicolo!", ["veh_released"] = " Veicolo recuperato con successo. ", + ["not_owning_veh"] = "non possiedi questo veicolo!", ["veh_Impound_released"] = " Veicolo recuperato con successo dal sequestro. ", ["veh_stored"] = " Veicolo depositato con successo ", ["veh_impounded"] = " Veicolo sequestrato ", diff --git a/server-data/resources/[esx_addons]/esx_garage/nui/ui.html b/server-data/resources/[esx_addons]/esx_garage/nui/ui.html index e1aa13b6..1e195424 100644 --- a/server-data/resources/[esx_addons]/esx_garage/nui/ui.html +++ b/server-data/resources/[esx_addons]/esx_garage/nui/ui.html @@ -16,13 +16,14 @@