Skip to content

Commit

Permalink
chore: updated export methods
Browse files Browse the repository at this point in the history
  • Loading branch information
bitpredator committed Dec 5, 2023
1 parent 735a31e commit a63b205
Show file tree
Hide file tree
Showing 12 changed files with 9 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ local Keys = {
["N-"] = 97, ["N7"] = 117, ["N8"] = 61, ["N9"] = 118
}

ESX = nil
local labels = {}
local craftingQueue = {}
local job = ""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
ESX = nil
ESX = exports["es_extended"]:getSharedObject()
function setCraftingLevel(identifier, level)
MySQL.Async.execute(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ local armor = 0
local food = 0
local thirst = 0
local posi = "bottom"
ESX = nil

ESX = exports["es_extended"]:getSharedObject()

Expand Down
4 changes: 3 additions & 1 deletion server-data/resources/[bpt_addons]/bpt_hud/fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
ESX = nil
ESX = exports["es_extended"]:getSharedObject()

RegisterServerEvent('bpt_woodcutter:pickedUpWood')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
local firstSpawn, PlayerLoaded = true, false

isDead, isSearched, medic = false, false, 0
ESX = nil

AddEventHandler("onClientMapStart", function()
exports.spawnmanager:spawnPlayer()
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
ESX = nil
local playersHealing, deadPlayers = {}, {}

ESX = exports["es_extended"]:getSharedObject()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
local ESX = nil
local oneSyncEnabled = GetConvar('onesync_enabled', false)
local VERBOSE = false
local lastPlant = {}
Expand Down
4 changes: 1 addition & 3 deletions server-data/resources/[sqz]/sqz_carkeys/client/client.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
CreateThread(function()
ESX = exports["es_extended"]:getSharedObject()
end)
ESX = exports["es_extended"]:getSharedObject()

RegisterCommand('lockvehicle', function()

Expand Down

0 comments on commit a63b205

Please sign in to comment.