From 4d117f3a0f76e445af4877f005a822c6dd780a3a Mon Sep 17 00:00:00 2001 From: bitpredator <67551273+bitpredator@users.noreply.github.com> Date: Mon, 9 Dec 2024 10:43:09 +0100 Subject: [PATCH 01/10] chore: garage reconstruction for a more realistic system This PR introduces an important reconstruction of the property vehicle storage system (public garages) --- .../esx_garage/client/antidespawn.lua | 2 +- .../[esx_addons]/esx_garage/client/main.lua | 14 +++-------- .../[esx_addons]/esx_garage/config.lua | 24 +------------------ .../[esx_addons]/esx_garage/fxmanifest.lua | 2 +- .../[esx_addons]/esx_garage/locales/en.lua | 3 --- .../[esx_addons]/esx_garage/locales/it.lua | 3 --- .../[esx_addons]/esx_garage/nui/ui.html | 5 ++-- .../[esx_addons]/esx_garage/server/main.lua | 2 ++ 8 files changed, 10 insertions(+), 45 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 6cd1d0803..ae18c8b25 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,5 @@ local model, coords, heading -local vehicle = CreateVehicle(model, coords.x, coords.y, coords.z + 1.0, heading, true, false) +local vehicle = CreateVehicle(model, GetEntityCoords(coords), GetEntityHeading(heading), 1, 0, false, false) 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 6f5325bd6..33c77baef 100644 --- a/server-data/resources/[esx_addons]/esx_garage/client/main.lua +++ b/server-data/resources/[esx_addons]/esx_garage/client/main.lua @@ -1,3 +1,5 @@ +---@diagnostic disable: undefined-global + local LastMarker, LastPart, thisGarage, thisPound = nil, nil, nil, nil local next = next local nearMarker, menuIsShowed = false, false @@ -13,9 +15,6 @@ AddEventHandler("esx_garage:closemenu", function() hideAll = true, }) - if not menuIsShowed and thisGarage then - ESX.TextUI(TranslateCap("access_parking")) - end if not menuIsShowed and thisPound then ESX.TextUI(TranslateCap("access_Impound")) end @@ -85,7 +84,6 @@ CreateThread(function() SetBlipAsShortRange(blip, true) BeginTextCommandSetBlipName("STRING") - AddTextComponentSubstringPlayerName(TranslateCap("parking_blip_name")) EndTextCommandSetBlipName(blip) end @@ -106,15 +104,9 @@ end) AddEventHandler("esx_garage:hasEnteredMarker", function(name, part) if part == "EntryPoint" then - local isInVehicle = IsPedInAnyVehicle(ESX.PlayerData.ped, false) + local _ = IsPedInAnyVehicle(ESX.PlayerData.ped, false) local garage = Config.Garages[name] thisGarage = garage - - if isInVehicle then - ESX.TextUI(TranslateCap("park_veh")) - else - ESX.TextUI(TranslateCap("access_parking")) - end end if part == "GetOutPoint" then diff --git a/server-data/resources/[esx_addons]/esx_garage/config.lua b/server-data/resources/[esx_addons]/esx_garage/config.lua index 0527437d4..7c99ac8b3 100644 --- a/server-data/resources/[esx_addons]/esx_garage/config.lua +++ b/server-data/resources/[esx_addons]/esx_garage/config.lua @@ -39,29 +39,6 @@ Config.Garages = { y = -886.5, z = 31.0, }, - SpawnPoint = { - x = -309.3, - y = -897.0, - z = 31.0, - heading = 351.8, - }, - Sprite = 357, - Scale = 0.8, - Colour = 3, - ImpoundedName = "LosSantos", - }, - SanAndreasAvenue = { - EntryPoint = { - x = 216.4, - y = -786.6, - z = 30.8, - }, - SpawnPoint = { - x = 218.9, - y = -779.7, - z = 30.8, - heading = 338.8, - }, Sprite = 357, Scale = 0.8, Colour = 3, @@ -126,6 +103,7 @@ Config.Impounds = { exports("getGarages", function() return Config.Garages end) + exports("getImpounds", function() return Config.Impounds end) diff --git a/server-data/resources/[esx_addons]/esx_garage/fxmanifest.lua b/server-data/resources/[esx_addons]/esx_garage/fxmanifest.lua index b80baf0eb..646a70d96 100644 --- a/server-data/resources/[esx_addons]/esx_garage/fxmanifest.lua +++ b/server-data/resources/[esx_addons]/esx_garage/fxmanifest.lua @@ -12,7 +12,7 @@ shared_script("@es_extended/imports.lua") server_scripts({ "@es_extended/locale.lua", "locales/*.lua", "@oxmysql/lib/MySQL.lua", "config.lua", "server/main.lua" }) -client_scripts({ "@es_extended/locale.lua", "locales/*.lua", "config.lua", "client/main.lua" }) +client_scripts({ "@es_extended/locale.lua", "locales/*.lua", "config.lua", "client/*.lua" }) ui_page("nui/ui.html") 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 38adcf821..9a165b7fe 100644 --- a/server-data/resources/[esx_addons]/esx_garage/locales/en.lua +++ b/server-data/resources/[esx_addons]/esx_garage/locales/en.lua @@ -1,9 +1,6 @@ Locales["en"] = { - ["parking_blip_name"] = "Garage", ["Impound_blip_name"] = "Impound", - ["access_parking"] = "press [E] to access the car park.", ["access_Impound"] = "press [E] to access the impound.", - ["park_veh"] = "press [E] to park the vehicle.", ["not_owning_veh"] = "You do not own this vehicle!", ["veh_released"] = "Successfully Retrieved Vehicle.", ["veh_Impound_released"] = "Successfully Retrieved Vehicle From Impound.", 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 f3be9c2cd..9e39070d7 100644 --- a/server-data/resources/[esx_addons]/esx_garage/locales/it.lua +++ b/server-data/resources/[esx_addons]/esx_garage/locales/it.lua @@ -1,9 +1,6 @@ Locales["it"] = { - ["parking_blip_name"] = "Garage", ["Impound_blip_name"] = "Sequestro", - ["access_parking"] = "premi [E] per accedere al parcheggio.", ["access_Impound"] = "premi [E] per accedere al sequestro.", - ["park_veh"] = "premi [E] per parcheggiare il veicolo.", ["not_owning_veh"] = "non possiedi questo veicolo!", ["veh_released"] = " Veicolo recuperato con successo. ", ["veh_Impound_released"] = " Veicolo recuperato con successo dal sequestro. ", 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 d8c4b7e7f..e1aa13b69 100644 --- a/server-data/resources/[esx_addons]/esx_garage/nui/ui.html +++ b/server-data/resources/[esx_addons]/esx_garage/nui/ui.html @@ -8,10 +8,9 @@
Discord - Documentation +
Discord
-Store Your vehicles in style! ESX garage has an amazing New UI to help you be stylish while parking your broken, rusty Nissan Micra!
-
-# Legal
-
-esx_Garage - store vehicles in style!
-
-Copyright (C) ESX-Framework
+Copyright (C) 2024-2025 bitpredator
This program Is free software: you can redistribute it And/Or modify it under the terms Of the GNU General Public License As published by the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version.
This program Is distributed In the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty Of MERCHANTABILITY Or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License For more details.
-You should have received a copy Of the GNU General Public License along with this program. If Not, see http://www.gnu.org/licenses/.
+ATTENTION:
+You are not authorized to change the name of the resource and the resources within it.
+
+If you want to contribute you can open a pull request.
\ No newline at end of file
diff --git a/server-data/resources/[esx_addons]/esx_garage/fxmanifest.lua b/server-data/resources/[esx_addons]/esx_garage/fxmanifest.lua
index 646a70d96..0a5c0ee43 100644
--- a/server-data/resources/[esx_addons]/esx_garage/fxmanifest.lua
+++ b/server-data/resources/[esx_addons]/esx_garage/fxmanifest.lua
@@ -1,10 +1,10 @@
fx_version("cerulean")
game("gta5")
-author("ESX-Framework")
+author("ESX-Framework - Rework: Bitpredator")
description("Allows Players to Store & Retrieve their vehicles")
-version("1.0.2")
+version("1.0.3")
lua54("yes")
From 6261dcf44416527045dd99e51ebc120172472082 Mon Sep 17 00:00:00 2001
From: bitpredator <67551273+bitpredator@users.noreply.github.com>
Date: Tue, 10 Dec 2024 10:19:54 +0100
Subject: [PATCH 05/10] fix: (bpt_addonaccount) Undefined global `MySQL`.
In this PR the license year of the resource has been updated, also the issue of: "Undefined global `MySQL`" has been corrected, in the development environment while visual studio code was being used, the fxmanifest file has also been updated to version 1.0.3.
---
server-data/resources/[bpt_addons]/bpt_addonaccount/LICENSE | 4 ++--
server-data/resources/[bpt_addons]/bpt_addonaccount/README.md | 2 +-
.../resources/[bpt_addons]/bpt_addonaccount/fxmanifest.lua | 2 +-
.../bpt_addonaccount/server/classes/addonaccount.lua | 2 ++
.../resources/[bpt_addons]/bpt_addonaccount/server/main.lua | 2 ++
5 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/server-data/resources/[bpt_addons]/bpt_addonaccount/LICENSE b/server-data/resources/[bpt_addons]/bpt_addonaccount/LICENSE
index e8e8b9ba3..3277ea90a 100644
--- a/server-data/resources/[bpt_addons]/bpt_addonaccount/LICENSE
+++ b/server-data/resources/[bpt_addons]/bpt_addonaccount/LICENSE
@@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Discord
-Copyright (C) 2024 bitpredator
+Copyright (C) 2024-2025 bitpredator
This program Is free software: you can redistribute it And/Or modify it under the terms Of the GNU General Public License As published by the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version.
diff --git a/server-data/resources/[bpt_addons]/bpt_addonaccount/fxmanifest.lua b/server-data/resources/[bpt_addons]/bpt_addonaccount/fxmanifest.lua
index dbc5331a2..cf9f1fbb8 100644
--- a/server-data/resources/[bpt_addons]/bpt_addonaccount/fxmanifest.lua
+++ b/server-data/resources/[bpt_addons]/bpt_addonaccount/fxmanifest.lua
@@ -4,7 +4,7 @@ game("gta5")
author("bitpredator")
description("Allows resources to store account data, such as society funds")
lua54("yes")
-version("1.0.2")
+version("1.0.3")
server_scripts({
"@es_extended/imports.lua",
diff --git a/server-data/resources/[bpt_addons]/bpt_addonaccount/server/classes/addonaccount.lua b/server-data/resources/[bpt_addons]/bpt_addonaccount/server/classes/addonaccount.lua
index c13d86f23..929278220 100644
--- a/server-data/resources/[bpt_addons]/bpt_addonaccount/server/classes/addonaccount.lua
+++ b/server-data/resources/[bpt_addons]/bpt_addonaccount/server/classes/addonaccount.lua
@@ -1,3 +1,5 @@
+---@diagnostic disable: undefined-global
+
function CreateAddonAccount(name, owner, money)
local self = {}
diff --git a/server-data/resources/[bpt_addons]/bpt_addonaccount/server/main.lua b/server-data/resources/[bpt_addons]/bpt_addonaccount/server/main.lua
index 6d35f8209..276959a75 100644
--- a/server-data/resources/[bpt_addons]/bpt_addonaccount/server/main.lua
+++ b/server-data/resources/[bpt_addons]/bpt_addonaccount/server/main.lua
@@ -1,3 +1,5 @@
+---@diagnostic disable: undefined-global
+
local AccountsIndex, Accounts, SharedAccounts = {}, {}, {}
AddEventHandler("onResourceStart", function(resourceName)
From 36c3efa312d1b84c36e28834a99572837f4aaf4b Mon Sep 17 00:00:00 2001
From: bitpredator <67551273+bitpredator@users.noreply.github.com>
Date: Tue, 10 Dec 2024 11:18:34 +0100
Subject: [PATCH 06/10] remove [Christmas] pack
---
.../[Christmas]/changer_square/fxmanifest.lua | 4 ----
.../changer_props/changer_snow_beaver.ydr | Bin 2691484 -> 0 bytes
.../changer_props/changer_snow_border.ydr | Bin 29661 -> 0 bytes
.../changer_props/changer_snow_candy.ydr | Bin 249490 -> 0 bytes
.../changer_props/changer_snow_ferris.ydr | Bin 203801 -> 0 bytes
.../changer_props/changer_snow_gifts.ydr | Bin 706141 -> 0 bytes
.../changer_props/changer_snow_iglu.ydr | Bin 864980 -> 0 bytes
.../changer_props/changer_snow_luzes.ydr | Bin 283318 -> 0 bytes
.../changer_props/changer_snow_mahzinha1.ydr | Bin 38609 -> 0 bytes
.../changer_props/changer_snow_mahzinha2.ydr | Bin 38669 -> 0 bytes
.../changer_props/changer_snow_santa.ydr | Bin 1879331 -> 0 bytes
.../changer_props/changer_snow_santa.ytyp | Bin 1347 -> 0 bytes
.../changer_props/changer_snow_star.ydr | Bin 2414 -> 0 bytes
.../changer_props/changer_snow_tree.ydr | Bin 168182 -> 0 bytes
.../changer_props/changer_snow_tree2.ydr | Bin 134879 -> 0 bytes
.../stream/changer_props/changer_snow_txt.ytd | Bin 3647905 -> 0 bytes
.../stream/changer_snow_manifest.ymf | Bin 524 -> 0 bytes
.../changer_square/stream/changer_ymap.ymap | Bin 6501 -> 0 bytes
.../stream/hei_dt1_13_strm_0.ymap | Bin 8129 -> 0 bytes
.../stream/objetos/dt1_13_0.ybn | Bin 132729 -> 0 bytes
.../stream/objetos/dt1_13_build1.ydr | Bin 1643492 -> 0 bytes
.../stream/objetos/dt1_13_dtlb.ydr | Bin 181700 -> 0 bytes
.../stream/objetos/dt1_13_grounddetailb.ydr | Bin 2177 -> 0 bytes
.../objetos/dt1_13_superlod_children.ydd | Bin 137670 -> 0 bytes
.../stream/objetos/hi@dt1_13_0.ybn | Bin 113600 -> 0 bytes
.../stream/prop_ld_ferris_wheel+hidr.ytd | Bin 1236664 -> 0 bytes
26 files changed, 4 deletions(-)
delete mode 100644 server-data/resources/[Christmas]/changer_square/fxmanifest.lua
delete mode 100644 server-data/resources/[Christmas]/changer_square/stream/changer_props/changer_snow_beaver.ydr
delete mode 100644 server-data/resources/[Christmas]/changer_square/stream/changer_props/changer_snow_border.ydr
delete mode 100644 server-data/resources/[Christmas]/changer_square/stream/changer_props/changer_snow_candy.ydr
delete mode 100644 server-data/resources/[Christmas]/changer_square/stream/changer_props/changer_snow_ferris.ydr
delete mode 100644 server-data/resources/[Christmas]/changer_square/stream/changer_props/changer_snow_gifts.ydr
delete mode 100644 server-data/resources/[Christmas]/changer_square/stream/changer_props/changer_snow_iglu.ydr
delete mode 100644 server-data/resources/[Christmas]/changer_square/stream/changer_props/changer_snow_luzes.ydr
delete mode 100644 server-data/resources/[Christmas]/changer_square/stream/changer_props/changer_snow_mahzinha1.ydr
delete mode 100644 server-data/resources/[Christmas]/changer_square/stream/changer_props/changer_snow_mahzinha2.ydr
delete mode 100644 server-data/resources/[Christmas]/changer_square/stream/changer_props/changer_snow_santa.ydr
delete mode 100644 server-data/resources/[Christmas]/changer_square/stream/changer_props/changer_snow_santa.ytyp
delete mode 100644 server-data/resources/[Christmas]/changer_square/stream/changer_props/changer_snow_star.ydr
delete mode 100644 server-data/resources/[Christmas]/changer_square/stream/changer_props/changer_snow_tree.ydr
delete mode 100644 server-data/resources/[Christmas]/changer_square/stream/changer_props/changer_snow_tree2.ydr
delete mode 100644 server-data/resources/[Christmas]/changer_square/stream/changer_props/changer_snow_txt.ytd
delete mode 100644 server-data/resources/[Christmas]/changer_square/stream/changer_snow_manifest.ymf
delete mode 100644 server-data/resources/[Christmas]/changer_square/stream/changer_ymap.ymap
delete mode 100644 server-data/resources/[Christmas]/changer_square/stream/hei_dt1_13_strm_0.ymap
delete mode 100644 server-data/resources/[Christmas]/changer_square/stream/objetos/dt1_13_0.ybn
delete mode 100644 server-data/resources/[Christmas]/changer_square/stream/objetos/dt1_13_build1.ydr
delete mode 100644 server-data/resources/[Christmas]/changer_square/stream/objetos/dt1_13_dtlb.ydr
delete mode 100644 server-data/resources/[Christmas]/changer_square/stream/objetos/dt1_13_grounddetailb.ydr
delete mode 100644 server-data/resources/[Christmas]/changer_square/stream/objetos/dt1_13_superlod_children.ydd
delete mode 100644 server-data/resources/[Christmas]/changer_square/stream/objetos/hi@dt1_13_0.ybn
delete mode 100644 server-data/resources/[Christmas]/changer_square/stream/prop_ld_ferris_wheel+hidr.ytd
diff --git a/server-data/resources/[Christmas]/changer_square/fxmanifest.lua b/server-data/resources/[Christmas]/changer_square/fxmanifest.lua
deleted file mode 100644
index 216c1f9b4..000000000
--- a/server-data/resources/[Christmas]/changer_square/fxmanifest.lua
+++ /dev/null
@@ -1,4 +0,0 @@
-fx_version 'adamant'
-games { 'gta5' }
-
-this_is_a_map 'yes'
\ No newline at end of file
diff --git a/server-data/resources/[Christmas]/changer_square/stream/changer_props/changer_snow_beaver.ydr b/server-data/resources/[Christmas]/changer_square/stream/changer_props/changer_snow_beaver.ydr
deleted file mode 100644
index b156e0789398ba3d823e0701c92175bf316380eb..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 2691484
zcmZ^K^IxT3*zRQ4WNT`&F}Wt&H8t6sY}>W7HQDCQoNU|HWbAP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