Documentation

Setup

Install and configure the shredder.

#Dependencies

Install oxmysql and zyke_lib, and configure the framework and inventory providers in zyke_lib. See Dependencies.

#Resource & Items

Place the resource in your server's resources folder as zyke_shredder.

Copy the matching definitions from zyke_shredder/extras/items/ox_inventory.txt or zyke_shredder/extras/items/qb-core.txt into your configured inventory. Copy the icons from extras/items/images/256/ into the inventory's image directory. The bundled definitions include the twelve scrap outputs, diesel_can, and the compact set: shredder_compact, shredder_generator, shredder_cable, and shredder_box.

Keep diesel_can non-stackable/unique so each can retains its remaining litres. It reuses the inventory's existing weapon_petrolcan image. Keep shredder_generator non-stackable/unique as well, since it stores the diesel left in its tank.

The compact set is not sold anywhere by default. Add its items to a shop or another source so players can obtain them, or set compact.enabled = false.

Parts used by the default recipes come from other resources. Install their items from those resources' own extras folders.

#Configuration

Edit shared/unlocked/config.lua. Review machine placement, permissions, the interaction mode, the generator, the bin, the compact set, and the scrap buyer. Use the Config reference for current defaults.

To place a machine, stand where the cutting chamber should go, face along the infeed, and run /shredderpos. The command prints a ready coords line to the F8 console. Leave about 2.4 metres to the left for the generator.

Custom action restrictions belong in client/unlocked/can_checks.lua and server/unlocked/can_checks.lua. Enforce trusted restrictions on the server.

#Start Order

Start your configured providers and their dependencies before Shredder:

cfg
ensure oxmysql
ensure zyke_lib
ensure zyke_shredder

Database tables are created on first start, and the default recipes are imported once. The console warns about any output, fuel, or compact set item missing from your inventory.

With interaction = "target", start ox_target or qb-target before Shredder as well.

#Verify Gameplay

Fill the generator from a diesel_can, start the shredder, and load a part with a recipe. Collect the scrap from the bin and sell it to the scrap buyer. Open /shredderadmin to confirm the recipes were imported.

For the compact set, run /shreddercompact shredder, generator, and box, link the generator with a shredder_cable, and shred a part. See Compact Shredder.