Consumables: FAQ
Fixes for the most common Consumables problems, from item setup and hunger and thirst to giving food, ground drops and spoilage.
Turn on Debug first
With Debug = true, the script prints the detected framework and inventory, every bite with its hunger and thirst
value, every offer and every drop to the console. It is the fastest way to find a problem.
None of ox_inventory, ps-inventory, jpr-inventory or qb-inventory is running, or hype-consumables starts before
it. Move ensure hype-consumables below your inventory in server.cfg. If you set Inventory to a fixed value,
check that it matches the running resource.
The listed items exist in config/foods.lua but not in your inventory. Add them from INSTALL/ox_inventory.md or
INSTALL/qb_inventory.md (see Installation), or remove the entries you do
not want from config/foods.lua.
Another definition of the item is still active. On ox_inventory, burger, sprunk, water, sandwich, coffee
and grapejuice already exist in data/items.lua; delete the old ones, because a duplicate key keeps the last
one. Check that the item has consume = 0 and client.export set to 'hype-consumables.useFood'. On qb style
inventories, remove other usable registrations of the same items, for example in qb-smallresources. Also check
that the folder is named exactly hype-consumables.
Check the Debug output for Framework detected. If it says standalone, your framework started after the script
or is not supported; move ensure hype-consumables below it. On ESX, values are sent to esx_status, so it must be
running. On QBCore, the HUD is refreshed with hud:client:UpdateNeeds. On standalone servers nothing is applied
until you listen to hype-consumables:server:addStatus.
The first bite opens a sealed package and moves it from its stack to its own slot. With a full inventory there is no slot for it. Free a slot and try again.
That is on purpose. Every opened food has its own amount and expiry date, so it keeps its own slot. Sealed packages
created together still stack on ox_inventory. On qb style inventories every food is unique, because they stack by
name only.
The food passed its expiry date. Set Spoilage.allowConsume = true to let players eat it with less hunger and
thirst and a small health loss, or change the spoil times in Categories or per food with spoilTime.
Eating ends on death, cuffs, and with Consume.cancelOnRagdoll on ragdoll, swimming or falling. It also ends when
the food leaves your inventory (given, dropped or moved to another inventory), and in a vehicle when
Consume.allowInVehicle is false.
The eating keys are only blocked while you eat or pick a player. If they collide with another script during that
time, change the control ids and labels in Controls. See the
FiveM control list.
They are only active while you pick a player or have an incoming offer. Players can change them under
Settings → Key Bindings → FiveM, so a player may have a different key. Changing Keys only affects players who
never had the binding.
No other player is within Transfer.distance (3 m by default). Stand closer or raise the distance. Offers are also
cancelled when the players move apart before the offer is accepted.
No target resource is running. Start ox_target or qb-target before the script. Without one, ground props are still spawned but cannot be picked up.
Food nobody picks up is removed after Drops.lifetime (one hour by default, 0 = never). With
Drops.removeSpoiled, spoiled food is removed too. With Drops.persist = false, every drop is removed on restart.
A character can have Drops.maxPerPlayer drops at once (5 by default, 0 = no limit), and the whole world
Drops.maxTotal (150 by default). Pick some up or raise the limits.
The food has no prop or dropProp, or its model does not exist in the game. Drops.fallbackProp is used then.
Set dropProp on the food to a model that exists.
The periodic check only walks online players' inventories. The expiry is stored as a timestamp, so it is applied on the next use or when the player joins.
The amount and expiry lines are written into the metadata on the server, in the language of ox:locale, whenever
the item changes. After changing the language, existing items update the next time they change, for example on
the next bite.
Yes. Add the item as usual. On ox_inventory the metadata is written right away; on qb style inventories it is written on first use or when the player joins.
Add an entry to config/foods.lua and an item with the same name to your inventory. See
Adding a food.
Set setr ox:locale "tr" (or another code) in server.cfg. See
Locales.
Yes, the Vue source is in web/. Edit it, then run pnpm install and pnpm build inside web/ to rebuild
web/build.
Download the new version, replace the folder and keep your config/config.lua and config/foods.lua. Check the
changelog for any new options and item changes.