Integrations
nuiro-vending includes its own bridge. Its config.lua and bridge/ files are listed as customer-editable in the resource manifest.
Included adapters
| Integration | Resource names / configuration |
|---|---|
| Framework | es_extended → esx; qb-core → qb; qbx_core → qbx |
| Inventory | ox_inventory, qb-inventory, ps-inventory, qs-inventory, codem-inventory, origen_inventory |
| Target | ox_target, qb-target, or textui |
| Notifications | ox_lib, framework notification adapters, okok, mythic, or custom |
| Phone | lb-phone custom-app integration |
Adapters call the APIs used by the supplied source. If another resource has changed those APIs, adapt the relevant editable bridge rather than changing the vending UI's purchase logic.
Item images
Leave Config.bridge.imagePath = '' to use the inventory default. ox_inventory reads the inventory:imagepath convar and falls back to nui://ox_inventory/web/images. Other adapters use these defaults:
| Inventory | Image base |
|---|---|
| QB / PS / QS | nui://<inventory-resource>/html/images |
| CodeM | nui://codem-inventory/html/itemimages |
| Origen | nui://origen_inventory/html/images |
You can override the base path, for example:
Config.bridge.imagePath = 'nui://my_inventory/html/images'Use the path for the actual inventory you run. For missing images, verify that the item image exists and the configured base points to the folder serving it.
Usable-item export
The client export is:
exports['nuiro-vending']:useMachine()It starts the item-use flow and then asks the server to validate the player, item, limits, and final setup. It does not grant a machine item or bypass those checks. For ox_inventory, use the supported item entry from Installation, with client.export = 'nuiro-vending.useMachine'.
The resource also listens to the client event nuiro-vending:client:useMachine for its own framework usable-item registration. Avoid registering duplicate handlers that consume the same item. The supplied source has no public server export for granting machines, transferring owners, or bypassing payments.
Custom inventory
Set Config.bridge.inventory = 'custom' and implement the placeholders in bridge/custom.lua:
| Function | Required result |
|---|---|
Bridge.CustomItems(name) | Item definition, including label, weight, stack behavior, and gear flags where relevant |
Bridge.CustomGetItems(src) | Inventory rows; preserve name, count, metadata, and slot information |
Bridge.CustomGetItemCount(src, name) | Numeric item count |
Bridge.CustomAddItem(src, name, count, metadata) | true only when the addition succeeds |
Bridge.CustomRemoveItem(src, name, count, metadata, slot) | true only when removal succeeds |
Bridge.CustomCanCarryItem(src, name, count, metadata) | Whether that item can be accepted |
Bridge.CustomCanCarryWeight(src, weight) | Whether the combined weight can be accepted |
The placeholders deliberately return empty/failure values until implemented. Setting custom alone does not create a working adapter. Preserve metadata and slot targeting for tracked or unique items, and use consistent weight units across definitions and carry checks.
Custom notifications
Set Config.bridge.notify = 'custom'. The bridge sends the client event configured by bridge.customNotify.event; its supplied name is nuiro-vending:customNotify.
In a client script in your notification integration:
RegisterNetEvent('nuiro-vending:customNotify', function(message, kind, title)
-- Map message, kind, and title to your own notification system.
-- kind is success, error, or inform.
end)Resource names and persistent IDs
Keep the installed folder name nuiro-vending. The resource uses GetCurrentResourceName() for its internal callback prefix and phone UI paths, while external item definitions reference the folder explicitly. The fixed phone identifier nuiro_vending, inventory shop ID nuiro_vending_dealer, and SQL prefix nuiro_vending_ are different identifiers and should not be changed as a branding edit.
