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

@@ -229,7 +229,7 @@ Inventory.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