[FREE] Flex Portablecraftbench (experimental OX-Inventory update)


OLD SCRIPT THAT WAS SUPPOSED TO BE PAID BUT HERE IT IS FREE

What is it?

Flex-portablecraftbench is a script where player can place and use a craftingbench anywhere they want.
Each bench has you define in the config uses its own item in items.lua and his metadata.
When placing it will show with 3d text its level and health (which you can also find in your inventory on hover)
When crafting there is a defind chance it will do damage to your bench.
Each craft will level up the bench (defined in config).
When grabbing the bench it rewrites the metadata of the bench item so it updates and you could use it again.
Each bench can be fixed when it has damage (cost = defined in config * the level of your current bench)

Preview: Watch here
Config preview: Click here
Inventory edit: Click here

How to install?

Make sure you have all the requirements shown below.
After that you can drag and drop the resource in your resource folder and ensure it.
When ensured you can edit the config to your liking.
Each item benchitem has to be the exact name as in items.lua.
After the config is set up you can start editing your qb-inventory.

Open your inventory and go to HTML > JS.
Start to look for the line with
else if (itemData.name == "markedbills") {
and replace it with this.

You will need to add every item / bench in there aswell.
For example after "workbench2" you need to add || and then itemData.name == "newbenchname"

After that it should work.
If you don’t understand it shoot me a dm here on the forum.


Items.lua example

[‘workbench1’] = {[‘name’] = ‘workbench1’, [‘label’] = ‘Standaard werkbank’, [‘weight’] = 1000, [‘type’] = ‘item’, [‘image’] = ‘bench1.png’, [‘unique’] = true, [‘useable’] = true, [‘description’] = ‘’},
[‘workbench2’] = {[‘name’] = ‘workbench2’, [‘label’] = ‘Materiaal werkbank’, [‘weight’] = 1000, [‘type’] = ‘item’, [‘image’] = ‘bench2.png’, [‘unique’] = true, [‘useable’] = true, [‘description’] = ‘’},

You can get it here: GITHUB

Code is accessible No (only config and language)
Subscription-based No
Lines (approximately) 339
Requirements qb-core, qb-iventory/ox-inventory, qb-input
Support Yes