From 8f7f9bb009590da9e6b750515fc81d1f12724902 Mon Sep 17 00:00:00 2001 From: Jim Shield Date: Tue, 29 Apr 2025 02:37:47 +0100 Subject: [PATCH 1/3] force stash to a table when removing items --- shared/stashcontrol.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shared/stashcontrol.lua b/shared/stashcontrol.lua index f392554..9dd1446 100644 --- a/shared/stashcontrol.lua +++ b/shared/stashcontrol.lua @@ -295,7 +295,9 @@ end --- stashRemoveItem(currentItems, "playerStash", { iron = 2, wood = 5 }) --- ``` function stashRemoveItem(stashItems, stashName, items) - + if type(stashName) ~= "table" then + stashName = { stashName } + end if isStarted(OXInv) then for k, v in pairs(items) do if type(stashName) == "table" then From b3100a336cf66609d966a6062232efc82c00c6ab Mon Sep 17 00:00:00 2001 From: Jim Shield Date: Tue, 29 Apr 2025 12:26:49 +0100 Subject: [PATCH 2/3] possible fix for lib error --- shared/itemcontrol.lua | 7 +++++-- starter.lua | 21 ++++++++++++++++++++- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/shared/itemcontrol.lua b/shared/itemcontrol.lua index 7b5bce8..10c4b4a 100644 --- a/shared/itemcontrol.lua +++ b/shared/itemcontrol.lua @@ -661,6 +661,7 @@ end ------------------------------------------------------------- -- Server Callback Registration ------------------------------------------------------------- +AuthEvent = nil currentToken = nil if isServer() then createCallback(getScript()..":server:canCarry", function(source, itemTable) @@ -720,6 +721,8 @@ if isServer() then end end) else - debugPrint("^1Auth^7: ^2Requesting ^3Auth Event^7") - AuthEvent = triggerCallback(getScript()..":callback:GetAuthEvent") + onPlayerLoaded(function() + debugPrint("^1Auth^7: ^2Requesting ^3Auth Event^7") + AuthEvent = triggerCallback(getScript()..":callback:GetAuthEvent") + end, true) end diff --git a/starter.lua b/starter.lua index 5dc6bc0..fef9852 100644 --- a/starter.lua +++ b/starter.lua @@ -55,9 +55,28 @@ QBInvNew = true InventoryWeight = 120000 +-- Testing loading the core files here instead of in fxmanifests +--for k, v in pairs({ -- This is a specific load order +-- [Exports.OXLibExport] = "init.lua", +-- [Exports.OXCoreExport] = "lib/init.lua", +-- [Exports.ESXExport] = "imports.lua", +-- [Exports.QBXExport] = "modules/playerdata.lua", +--}) do +-- if GetResourceState(k) == "started" then +-- print("^5Loading^7: '"..k.."/"..v.."' ^2into ^7'"..GetCurrentResourceName().."' ...") +-- local fileLoader = assert(load(LoadResourceFile(k, (v)), ('@@'..k..'/'..v))) +-- fileLoader() +-- print("^2Success^7: ^2loaded ^1Core ^2file^7: ^3"..k.."^7/^3"..(v):gsub("/", "^7/^3"):gsub("%.lua", "^7.lua").."^7") +-- else +-- if debugMode then +-- print("^3Warning^7: ^3"..k.." ^2not found^7, ^2skipping") +-- end +-- end +--end + -- Load files here into the invoking script for _, v in pairs({ -- This is a specific load order - --'convarCheck.lua', + 'helpers.lua', -- needs to be first '_loaders.lua', From a308f82be9468760edefc57d6471b3dc63d09446 Mon Sep 17 00:00:00 2001 From: Jim Shield Date: Tue, 29 Apr 2025 12:27:00 +0100 Subject: [PATCH 3/3] version bump --- fxmanifest.lua | 2 +- version.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 11e9e1a..06471d8 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -1,6 +1,6 @@ name "Jim_Bridge" author "Jimathy" -version "2.0" +version "2.0.01" description "Framework Bridge By Jimathy" fx_version "cerulean" rdr3_warning 'I acknowledge that this is a prerelease build of RedM, and I am aware my resources *will* become incompatible once RedM ships.' diff --git a/version.txt b/version.txt index 415b19f..2c60bdd 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -2.0 \ No newline at end of file +2.0.01 \ No newline at end of file