fix for jg-mechanic is missing

Replace earlier GetResourceState checks in multiple inventory modules so they only return early when the 'jg-mechanic' resource state is 'missing'. This standardizes behavior across modules (jpr, origen, ox, ps, qb, qs, tgiann) and fixes an inverted check in ox_inventory so the exports['jg-mechanic']:vehiclePlateUpdated call runs unless the resource is actually missing.
This commit is contained in:
MrNewb committed 2026-03-13 12:35:30 -04:00
1 parent 8475f65ee5
commit e0c6d2f8c7
8 files changed
+9 -9

No files matched your search

+2 -2
View File
@@ -209,7 +209,7 @@ Inventory.UpdatePlate = function(oldplate, newplate)
qbInventory:SetInventory('glovebox-'..newplate, storedGloveBox.items, "Community Bridge Moving Items In GloveBox")
qbInventory:CreateInventory('trunk-'..newplate, {label = 'trunk-'..newplate, slots = storedTrunk.slots, maxweight = storedTrunk.maxweight})
qbInventory:SetInventory('trunk-'..newplate, storedTrunk.items, "Community Bridge Moving Items In Trunk")
if GetResourceState('jg-mechanic') ~= 'started' then return true end
if GetResourceState('jg-mechanic') == 'missing' then return true end
return true, exports["jg-mechanic"]:vehiclePlateUpdated(oldplate, newplate)
end
@@ -272,7 +272,7 @@ Inventory.Old.UpdatePlate = function(oldplate, newplate)
}
local values = { newplate = newplate, oldplate = oldplate }
MySQL.transaction.await(queries, values)
if GetResourceState('jg-mechanic') ~= 'started' then return true end
if GetResourceState('jg-mechanic') == 'missing' then return true end
return true, exports["jg-mechanic"]:vehiclePlateUpdated(oldplate, newplate)
end