install/ox_inventory-2.48.0.patch changes two ox_inventory files. Every added block is marked glitch-stores, so you can copy them by hand when git apply fails. The patch is GPL-3.0, like ox_inventory.
modules/shops/server.lua:
SetShopPriceMultiplier(shopType, items, mult)multiplies chosen item prices in every shop of a type. The clerk price surge uses it.- The
ox_inventory:openShopcallback hands shop types this resource takes (Takes) toOpenafter its own checks. buyItembecomes a local function, so the new exports run exactly the same checks and hooks. It takes an optionalpayment:'bank'pays a money price from the qbx_core bank account.- One purchase at a time per player, with the target slot locked (
modules.locks). An item that could not be paid for is taken back. - New exports
GlitchOpenShop,GlitchGetShopandGlitchBuyItem.
modules/shops/client.lua:
- Shop zones and peds open this screen for the shop types it takes, and the normal window for the rest.
- A shop type with
clerk = trueindata/shops.luagets only its blip and no counter zone, so it opens from the GTA clerk.
Updating ox_inventory#
- Before you update, check whether a newer
install/ox_inventory-<version>.patchships with glitch-stores. - If there is none, run
git apply --checkwith the 2.48.0 patch against the new version. When it passes, apply it. When it fails, copy the blocks markedglitch-storesby hand. - Restart ox_inventory, then glitch-stores, and watch the console. No error at start means the exports are there.
Stuck on a step?Ask in the Discord →