From 5e044c6eb7696a622f21e7d5554becede7450368 Mon Sep 17 00:00:00 2001 From: TheFantomas Date: Sun, 19 Feb 2023 17:33:08 +0100 Subject: [PATCH 1/8] Preparing for 1.9.3 - So that there is no problem like with 1.9.2 --- [core]/cron/fxmanifest.lua | 2 +- [core]/es_extended/fxmanifest.lua | 2 +- [core]/esx_context/fxmanifest.lua | 2 +- [core]/esx_identity/fxmanifest.lua | 2 +- [core]/esx_loadingscreen/fxmanifest.lua | 2 +- [core]/esx_menu_default/fxmanifest.lua | 2 +- [core]/esx_menu_dialog/fxmanifest.lua | 2 +- [core]/esx_menu_list/fxmanifest.lua | 2 +- [core]/esx_multicharacter/fxmanifest.lua | 2 +- [core]/esx_notify/fxmanifest.lua | 2 +- [core]/esx_skin/fxmanifest.lua | 2 +- [core]/esx_textui/fxmanifest.lua | 2 +- [core]/skinchanger/fxmanifest.lua | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/[core]/cron/fxmanifest.lua b/[core]/cron/fxmanifest.lua index b48b0f2a0..f1a958375 100644 --- a/[core]/cron/fxmanifest.lua +++ b/[core]/cron/fxmanifest.lua @@ -4,6 +4,6 @@ game 'gta5' author 'ESX-Framework' description 'cron' lua54 'yes' -version '1.9.2' +version '1.9.3' server_script 'server/main.lua' diff --git a/[core]/es_extended/fxmanifest.lua b/[core]/es_extended/fxmanifest.lua index 027ec4623..78fd08c6e 100644 --- a/[core]/es_extended/fxmanifest.lua +++ b/[core]/es_extended/fxmanifest.lua @@ -5,7 +5,7 @@ game 'gta5' description 'ES Extended' lua54 'yes' -version '1.9.2' +version '1.9.3' shared_scripts { 'locale.lua', diff --git a/[core]/esx_context/fxmanifest.lua b/[core]/esx_context/fxmanifest.lua index 791bbf08d..0c1f12b60 100644 --- a/[core]/esx_context/fxmanifest.lua +++ b/[core]/esx_context/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' author 'ESX-Framework & Brayden' description 'Offical ESX Legacy Context Menu' lua54 'yes' -version '1.9.2' +version '1.9.3' ui_page 'index.html' diff --git a/[core]/esx_identity/fxmanifest.lua b/[core]/esx_identity/fxmanifest.lua index 2e32480d0..ba7133f24 100644 --- a/[core]/esx_identity/fxmanifest.lua +++ b/[core]/esx_identity/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX Identity' lua54 'yes' -version '1.9.2' +version '1.9.3' shared_scripts { '@es_extended/imports.lua', diff --git a/[core]/esx_loadingscreen/fxmanifest.lua b/[core]/esx_loadingscreen/fxmanifest.lua index c4efb00a8..5333324be 100644 --- a/[core]/esx_loadingscreen/fxmanifest.lua +++ b/[core]/esx_loadingscreen/fxmanifest.lua @@ -1,5 +1,5 @@ game 'common' -version '1.9.2' +version '1.9.3' fx_version 'cerulean' author 'ESX-Framework' lua54 'yes' diff --git a/[core]/esx_menu_default/fxmanifest.lua b/[core]/esx_menu_default/fxmanifest.lua index 5a87e2717..d60daad2a 100644 --- a/[core]/esx_menu_default/fxmanifest.lua +++ b/[core]/esx_menu_default/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX Menu Default' lua54 'yes' -version '1.9.2' +version '1.9.3' client_scripts {'@es_extended/imports.lua', 'client/main.lua'} diff --git a/[core]/esx_menu_dialog/fxmanifest.lua b/[core]/esx_menu_dialog/fxmanifest.lua index 89cfe4606..c765650f0 100644 --- a/[core]/esx_menu_dialog/fxmanifest.lua +++ b/[core]/esx_menu_dialog/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX Menu Dialog' lua54 'yes' -version '1.9.2' +version '1.9.3' client_scripts { '@es_extended/imports.lua', diff --git a/[core]/esx_menu_list/fxmanifest.lua b/[core]/esx_menu_list/fxmanifest.lua index e6ec9fdfc..17e80e956 100644 --- a/[core]/esx_menu_list/fxmanifest.lua +++ b/[core]/esx_menu_list/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX Menu List' lua54 'yes' -version '1.9.2' +version '1.9.3' client_scripts { '@es_extended/imports.lua', diff --git a/[core]/esx_multicharacter/fxmanifest.lua b/[core]/esx_multicharacter/fxmanifest.lua index f5355dfea..ebc9bf797 100644 --- a/[core]/esx_multicharacter/fxmanifest.lua +++ b/[core]/esx_multicharacter/fxmanifest.lua @@ -2,7 +2,7 @@ fx_version 'cerulean' game 'gta5' author 'ESX-Framework - Linden - KASH' description 'Official Multicharacter System For ESX Legacy' -version '1.9.2' +version '1.9.3' lua54 'yes' dependencies {'es_extended', 'esx_context', 'esx_identity', 'esx_skin'} diff --git a/[core]/esx_notify/fxmanifest.lua b/[core]/esx_notify/fxmanifest.lua index 6ec61966e..fc60108b3 100644 --- a/[core]/esx_notify/fxmanifest.lua +++ b/[core]/esx_notify/fxmanifest.lua @@ -1,7 +1,7 @@ fx_version 'adamant' lua54 'yes' game 'gta5' -version '1.9.2' +version '1.9.3' author 'ESX-Framework' description 'Official NUI Notification system for ESX' diff --git a/[core]/esx_skin/fxmanifest.lua b/[core]/esx_skin/fxmanifest.lua index 86759add0..68dd1dbbd 100644 --- a/[core]/esx_skin/fxmanifest.lua +++ b/[core]/esx_skin/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX Skin' -version '1.9.2' +version '1.9.3' lua54 'yes' shared_script '@es_extended/imports.lua' diff --git a/[core]/esx_textui/fxmanifest.lua b/[core]/esx_textui/fxmanifest.lua index 8342097cb..c063aed99 100644 --- a/[core]/esx_textui/fxmanifest.lua +++ b/[core]/esx_textui/fxmanifest.lua @@ -1,7 +1,7 @@ fx_version 'adamant' game 'gta5' author 'ESX-Framework' -version '1.9.2' +version '1.9.3' description 'ESX TextUI' lua54 'yes' client_scripts { 'TextUI.lua' } diff --git a/[core]/skinchanger/fxmanifest.lua b/[core]/skinchanger/fxmanifest.lua index 94d43f6d2..7e27d7d79 100644 --- a/[core]/skinchanger/fxmanifest.lua +++ b/[core]/skinchanger/fxmanifest.lua @@ -6,7 +6,7 @@ lua54 'yes' description 'Official ESX-Legacy resource for handling the Player`s Skin' -version '1.9.2' +version '1.9.3' client_scripts { '@es_extended/locale.lua', From fd759496f3472a8230570954892fae47a20709e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=20Gerg=C5=91?= Date: Mon, 20 Feb 2023 19:03:25 +0100 Subject: [PATCH 2/8] Fix: Actions, update ped in PlayerData --- [core]/es_extended/client/modules/actions.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/[core]/es_extended/client/modules/actions.lua b/[core]/es_extended/client/modules/actions.lua index af27393af..47f3aa4a1 100644 --- a/[core]/es_extended/client/modules/actions.lua +++ b/[core]/es_extended/client/modules/actions.lua @@ -24,6 +24,7 @@ CreateThread(function() if playerPed ~= PlayerPedId() then playerPed = PlayerPedId() + ESX.SetPlayerData('ped', playerPed) TriggerEvent('esx:playerPedChanged', playerPed) TriggerServerEvent('esx:playerPedChanged', PedToNet(playerPed)) end From 54b6a2b7b719aaaf9115809515420f924f4fee18 Mon Sep 17 00:00:00 2001 From: ic3d_ <65400214+ic3d00@users.noreply.github.com> Date: Mon, 20 Feb 2023 18:36:42 +0000 Subject: [PATCH 3/8] feat(esx_progressbar/fxmanifest) Add version (1.9.2) --- [core]/esx_progressbar/fxmanifest.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/[core]/esx_progressbar/fxmanifest.lua b/[core]/esx_progressbar/fxmanifest.lua index 993113ad0..f016689d7 100644 --- a/[core]/esx_progressbar/fxmanifest.lua +++ b/[core]/esx_progressbar/fxmanifest.lua @@ -2,6 +2,7 @@ fx_version 'adamant' game 'gta5' author 'ESX-Framework' lua54 'yes' +version '1.9.2' description 'ESX Progressbar' client_scripts { 'Progress.lua' } From 5b3c0e6784f86512de322d7d95aa0c5701c81513 Mon Sep 17 00:00:00 2001 From: Naifen || Developer Date: Mon, 20 Feb 2023 22:30:43 +0100 Subject: [PATCH 4/8] Update sharedevent link --- [core]/es_extended/client/common.lua | 2 +- [core]/es_extended/server/common.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/[core]/es_extended/client/common.lua b/[core]/es_extended/client/common.lua index c088fb902..e18f2884b 100644 --- a/[core]/es_extended/client/common.lua +++ b/[core]/es_extended/client/common.lua @@ -8,5 +8,5 @@ end AddEventHandler("esx:getSharedObject", function() local Invoke = GetInvokingResource() - print(("[^1ERROR^7] Resource ^5%s^7 Used the ^5getSharedObject^7 Event, this event ^1no longer exists!^7 Visit https://documentation.esx-framework.org/tutorials/sharedevent for how to fix!"):format(Invoke)) + print(("[^1ERROR^7] Resource ^5%s^7 Used the ^5getSharedObject^7 Event, this event ^1no longer exists!^7 Visit https://documentation.esx-framework.org/tutorials/tutorials-esx/sharedevent for how to fix!"):format(Invoke)) end) diff --git a/[core]/es_extended/server/common.lua b/[core]/es_extended/server/common.lua index 3e4b96712..3b1b87c6f 100644 --- a/[core]/es_extended/server/common.lua +++ b/[core]/es_extended/server/common.lua @@ -16,7 +16,7 @@ Core.PlayerFunctionOverrides = {} AddEventHandler("esx:getSharedObject", function() local Invoke = GetInvokingResource() - print(("[^1ERROR^7] Resource ^5%s^7 Used the ^5getSharedObject^7 Event, this event ^1no longer exists!^7 Visit https://documentation.esx-framework.org/tutorials/sharedevent for how to fix!"):format(Invoke)) + print(("[^1ERROR^7] Resource ^5%s^7 Used the ^5getSharedObject^7 Event, this event ^1no longer exists!^7 Visit https://documentation.esx-framework.org/tutorials/tutorials-esx/sharedevent for how to fix!"):format(Invoke)) end) exports('getSharedObject', function() From e41df74b0302dfc293e80abe7ce29ca5ef9a918e Mon Sep 17 00:00:00 2001 From: TheFantomas <117121911+TheFantomas@users.noreply.github.com> Date: Mon, 20 Feb 2023 22:52:49 +0100 Subject: [PATCH 5/8] chore(core/progressbar) Prepare for 1.9.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Idk why I merge commit with 1.9.2 🤦 --- [core]/esx_progressbar/fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/[core]/esx_progressbar/fxmanifest.lua b/[core]/esx_progressbar/fxmanifest.lua index f016689d7..fd81e99ff 100644 --- a/[core]/esx_progressbar/fxmanifest.lua +++ b/[core]/esx_progressbar/fxmanifest.lua @@ -2,7 +2,7 @@ fx_version 'adamant' game 'gta5' author 'ESX-Framework' lua54 'yes' -version '1.9.2' +version '1.9.3' description 'ESX Progressbar' client_scripts { 'Progress.lua' } From df21f8a4cc5efc545711ca820d77719e2a42eb68 Mon Sep 17 00:00:00 2001 From: TheFantomas <117121911+TheFantomas@users.noreply.github.com> Date: Tue, 21 Feb 2023 18:50:52 +0100 Subject: [PATCH 6/8] refactor(es_extended/client/main.lua): VehicleProperties better way --- [core]/es_extended/client/main.lua | 38 +++++++++++++++++------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/[core]/es_extended/client/main.lua b/[core]/es_extended/client/main.lua index e197e46b7..fc2addcdf 100644 --- a/[core]/es_extended/client/main.lua +++ b/[core]/es_extended/client/main.lua @@ -163,23 +163,29 @@ AddEventHandler('esx:restoreLoadout', function() end) AddStateBagChangeHandler('VehicleProperties', nil, function(bagName, key, value) - if value then - Wait(0) - local NetId = value.NetId - local Vehicle = NetworkGetEntityFromNetworkId(NetId) - local Tries = 0 - while Vehicle == 0 do - Vehicle = NetworkGetEntityFromNetworkId(NetId) - Wait(100) - Tries = Tries + 1 - if Tries > 300 then - break - end - end - if NetworkGetEntityOwner(Vehicle) == PlayerId() then - ESX.Game.SetVehicleProperties(Vehicle, value) - end + if not value then + return end + + local netId = bagName:gsub('entity:', '') + local timer = GetGameTimer() + while not NetworkDoesEntityExistWithNetworkId(tonumber(netId)) do + Wait(0) + if GetGameTimer() - timer > 10000 then + return + end + end + + local vehicle = NetToVeh(tonumber(netId)) + local timer = GetGameTimer() + while NetworkGetEntityOwner(vehicle) ~= PlayerId() do + Wait(0) + if GetGameTimer() - timer > 10000 then + return + end + end + + ESX.Game.SetVehicleProperties(vehicle, value) end) RegisterNetEvent('esx:setAccountMoney') From ddd86526f21eb85fae057d2eecf7cf1bde7b9a15 Mon Sep 17 00:00:00 2001 From: TheFantomas <117121911+TheFantomas@users.noreply.github.com> Date: Tue, 21 Feb 2023 18:51:46 +0100 Subject: [PATCH 7/8] netId is already not needed --- [core]/es_extended/server/onesync.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/[core]/es_extended/server/onesync.lua b/[core]/es_extended/server/onesync.lua index 168a7beee..f43acdd71 100644 --- a/[core]/es_extended/server/onesync.lua +++ b/[core]/es_extended/server/onesync.lua @@ -74,7 +74,6 @@ function ESX.OneSync.SpawnVehicle(model, coords, heading, properties, cb) end local networkId = NetworkGetNetworkIdFromEntity(createdVehicle) - vehicleProperties.NetId = networkId Entity(createdVehicle).state:set('VehicleProperties', vehicleProperties, true) cb(networkId) else From 4933b078110530cc093b3d472b9806f902ca70b6 Mon Sep 17 00:00:00 2001 From: TheFantomas <117121911+TheFantomas@users.noreply.github.com> Date: Tue, 21 Feb 2023 19:13:18 +0100 Subject: [PATCH 8/8] Credits --- [core]/es_extended/client/main.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/[core]/es_extended/client/main.lua b/[core]/es_extended/client/main.lua index fc2addcdf..4dfff72ce 100644 --- a/[core]/es_extended/client/main.lua +++ b/[core]/es_extended/client/main.lua @@ -162,6 +162,7 @@ AddEventHandler('esx:restoreLoadout', function() end end) +-- Credit: https://github.com/LukeWasTakenn, https://github.com/LukeWasTakenn/luke_garages/blob/master/client/client.lua#L331-L352 AddStateBagChangeHandler('VehicleProperties', nil, function(bagName, key, value) if not value then return