Studios
Storeshouse-3.jpg

ox_inventory Patch

SoonStoresQbox
PAGE 07 OF 07  ·  COMMANDS & EXPORTS → OX_INVENTORY PATCHdocs.glitchstudios.dev
Browse docs

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:openShop callback hands shop types this resource takes (Takes) to Open after its own checks.
  • buyItem becomes a local function, so the new exports run exactly the same checks and hooks. It takes an optional payment: '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, GlitchGetShop and GlitchBuyItem.

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 = true in data/shops.lua gets only its blip and no counter zone, so it opens from the GTA clerk.

Updating ox_inventory#

  1. Before you update, check whether a newer install/ox_inventory-<version>.patch ships with glitch-stores.
  2. If there is none, run git apply --check with the 2.48.0 patch against the new version. When it passes, apply it. When it fails, copy the blocks marked glitch-stores by hand.
  3. Restart ox_inventory, then glitch-stores, and watch the console. No error at start means the exports are there.