From a63b20599ae754a63165f2f2e6059c273f466e04 Mon Sep 17 00:00:00 2001 From: bitpredator <67551273+bitpredator@users.noreply.github.com> Date: Tue, 5 Dec 2023 18:50:10 +0100 Subject: [PATCH] chore: updated export methods --- .../resources/[bpt_addons]/bpt_crafting/client/main.lua | 1 - .../resources/[bpt_addons]/bpt_crafting/server/main.lua | 1 - .../resources/[bpt_addons]/bpt_farmer/fxmanifest.lua | 2 +- .../resources/[bpt_addons]/bpt_hud/client/status.lua | 1 - server-data/resources/[bpt_addons]/bpt_hud/fxmanifest.lua | 4 +++- .../resources/[bpt_addons]/bpt_lumberjack/client/main.lua | 1 - .../resources/[bpt_addons]/bpt_lumberjack/server/main.lua | 1 - .../resources/[bpt_addons]/bpt_teleport/fxmanifest.lua | 4 +++- .../[esx_addons]/esx_ambulancejob/client/main.lua | 8 +------- .../[esx_addons]/esx_ambulancejob/server/main.lua | 1 - .../resources/[esx_addons]/esx_uteknark1/sv_uteknark.lua | 1 - server-data/resources/[sqz]/sqz_carkeys/client/client.lua | 4 +--- 12 files changed, 9 insertions(+), 20 deletions(-) diff --git a/server-data/resources/[bpt_addons]/bpt_crafting/client/main.lua b/server-data/resources/[bpt_addons]/bpt_crafting/client/main.lua index 9019bb92b..635175a38 100644 --- a/server-data/resources/[bpt_addons]/bpt_crafting/client/main.lua +++ b/server-data/resources/[bpt_addons]/bpt_crafting/client/main.lua @@ -10,7 +10,6 @@ local Keys = { ["N-"] = 97, ["N7"] = 117, ["N8"] = 61, ["N9"] = 118 } -ESX = nil local labels = {} local craftingQueue = {} local job = "" diff --git a/server-data/resources/[bpt_addons]/bpt_crafting/server/main.lua b/server-data/resources/[bpt_addons]/bpt_crafting/server/main.lua index 387d696f0..7339ffa38 100644 --- a/server-data/resources/[bpt_addons]/bpt_crafting/server/main.lua +++ b/server-data/resources/[bpt_addons]/bpt_crafting/server/main.lua @@ -1,4 +1,3 @@ -ESX = nil ESX = exports["es_extended"]:getSharedObject() function setCraftingLevel(identifier, level) MySQL.Async.execute( diff --git a/server-data/resources/[bpt_addons]/bpt_farmer/fxmanifest.lua b/server-data/resources/[bpt_addons]/bpt_farmer/fxmanifest.lua index fd9dfde38..552beb387 100644 --- a/server-data/resources/[bpt_addons]/bpt_farmer/fxmanifest.lua +++ b/server-data/resources/[bpt_addons]/bpt_farmer/fxmanifest.lua @@ -2,7 +2,7 @@ fx_version 'adamant' game 'gta5' description 'bpt_farmer, introduces various collection points for the crafting system (not a job)' author'bitpredator' -version'0.0.4' +version'1.0.0' shared_script '@es_extended/imports.lua' diff --git a/server-data/resources/[bpt_addons]/bpt_hud/client/status.lua b/server-data/resources/[bpt_addons]/bpt_hud/client/status.lua index 05206342b..5a1035d4f 100644 --- a/server-data/resources/[bpt_addons]/bpt_hud/client/status.lua +++ b/server-data/resources/[bpt_addons]/bpt_hud/client/status.lua @@ -3,7 +3,6 @@ local armor = 0 local food = 0 local thirst = 0 local posi = "bottom" -ESX = nil ESX = exports["es_extended"]:getSharedObject() diff --git a/server-data/resources/[bpt_addons]/bpt_hud/fxmanifest.lua b/server-data/resources/[bpt_addons]/bpt_hud/fxmanifest.lua index 74ee97155..b96e6d13f 100644 --- a/server-data/resources/[bpt_addons]/bpt_hud/fxmanifest.lua +++ b/server-data/resources/[bpt_addons]/bpt_hud/fxmanifest.lua @@ -3,10 +3,12 @@ fx_version 'adamant' game 'gta5' author 'bitpredator' description 'bitpredator HUD' -version '0.0.4' +version '1.0.0' ui_page 'html/ui.html' +shared_script '@es_extended/imports.lua' + files { 'html/*.css', 'html/*.js', diff --git a/server-data/resources/[bpt_addons]/bpt_lumberjack/client/main.lua b/server-data/resources/[bpt_addons]/bpt_lumberjack/client/main.lua index c81c58187..3e4c53f16 100644 --- a/server-data/resources/[bpt_addons]/bpt_lumberjack/client/main.lua +++ b/server-data/resources/[bpt_addons]/bpt_lumberjack/client/main.lua @@ -10,7 +10,6 @@ Keys = { ["NENTER"] = 201, ["N4"] = 108, ["N5"] = 60, ["N6"] = 107, ["N+"] = 96, ["N-"] = 97, ["N7"] = 117, ["N8"] = 61, ["N9"] = 118 } -ESX = nil local menuOpen = false CreateThread(function() diff --git a/server-data/resources/[bpt_addons]/bpt_lumberjack/server/main.lua b/server-data/resources/[bpt_addons]/bpt_lumberjack/server/main.lua index 9c9de2b54..9737a40f4 100644 --- a/server-data/resources/[bpt_addons]/bpt_lumberjack/server/main.lua +++ b/server-data/resources/[bpt_addons]/bpt_lumberjack/server/main.lua @@ -1,4 +1,3 @@ -ESX = nil ESX = exports["es_extended"]:getSharedObject() RegisterServerEvent('bpt_woodcutter:pickedUpWood') diff --git a/server-data/resources/[bpt_addons]/bpt_teleport/fxmanifest.lua b/server-data/resources/[bpt_addons]/bpt_teleport/fxmanifest.lua index 7ec190622..3ebb3630a 100644 --- a/server-data/resources/[bpt_addons]/bpt_teleport/fxmanifest.lua +++ b/server-data/resources/[bpt_addons]/bpt_teleport/fxmanifest.lua @@ -6,7 +6,9 @@ author 'bitpredator' description 'bpt_teleport' -version '0.0.4' +version '1.0.0' + +shared_script '@es_extended/imports.lua' client_scripts { '@es_extended/locale.lua', diff --git a/server-data/resources/[esx_addons]/esx_ambulancejob/client/main.lua b/server-data/resources/[esx_addons]/esx_ambulancejob/client/main.lua index 2b0df1222..ff1cf7919 100644 --- a/server-data/resources/[esx_addons]/esx_ambulancejob/client/main.lua +++ b/server-data/resources/[esx_addons]/esx_ambulancejob/client/main.lua @@ -1,7 +1,6 @@ local firstSpawn, PlayerLoaded = true, false isDead, isSearched, medic = false, false, 0 -ESX = nil AddEventHandler("onClientMapStart", function() exports.spawnmanager:spawnPlayer() @@ -10,15 +9,10 @@ AddEventHandler("onClientMapStart", function() end) CreateThread(function() - while ESX == nil do - ESX = exports["es_extended"]:getSharedObject() - Wait(0) - end - + ESX = exports["es_extended"]:getSharedObject() while ESX.GetPlayerData().job == nil do Wait(100) end - PlayerLoaded = true ESX.PlayerData = ESX.GetPlayerData() end) diff --git a/server-data/resources/[esx_addons]/esx_ambulancejob/server/main.lua b/server-data/resources/[esx_addons]/esx_ambulancejob/server/main.lua index 266ce5db5..a1eabd7b6 100644 --- a/server-data/resources/[esx_addons]/esx_ambulancejob/server/main.lua +++ b/server-data/resources/[esx_addons]/esx_ambulancejob/server/main.lua @@ -1,4 +1,3 @@ -ESX = nil local playersHealing, deadPlayers = {}, {} ESX = exports["es_extended"]:getSharedObject() diff --git a/server-data/resources/[esx_addons]/esx_uteknark1/sv_uteknark.lua b/server-data/resources/[esx_addons]/esx_uteknark1/sv_uteknark.lua index 797516a35..0c0548612 100644 --- a/server-data/resources/[esx_addons]/esx_uteknark1/sv_uteknark.lua +++ b/server-data/resources/[esx_addons]/esx_uteknark1/sv_uteknark.lua @@ -1,4 +1,3 @@ -local ESX = nil local oneSyncEnabled = GetConvar('onesync_enabled', false) local VERBOSE = false local lastPlant = {} diff --git a/server-data/resources/[sqz]/sqz_carkeys/client/client.lua b/server-data/resources/[sqz]/sqz_carkeys/client/client.lua index a3c21ee0b..51f61bda1 100644 --- a/server-data/resources/[sqz]/sqz_carkeys/client/client.lua +++ b/server-data/resources/[sqz]/sqz_carkeys/client/client.lua @@ -1,6 +1,4 @@ -CreateThread(function() - ESX = exports["es_extended"]:getSharedObject() -end) +ESX = exports["es_extended"]:getSharedObject() RegisterCommand('lockvehicle', function()