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.txtorzyke_shredder/extras/items/qb-core.txtinto your configured inventory. Copy the icons fromextras/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, andshredder_box.Keep
diesel_cannon-stackable/unique so each can retains its remaining litres. It reuses the inventory's existingweapon_petrolcanimage. Keepshredder_generatornon-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
extrasfolders.
#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 readycoordsline to the F8 console. Leave about 2.4 metres to the left for the generator.Custom action restrictions belong in
client/unlocked/can_checks.luaandserver/unlocked/can_checks.lua. Enforce trusted restrictions on the server.
#Start Order
Start your configured providers and their dependencies before Shredder:
cfgensure oxmysql ensure zyke_lib ensure zyke_shredderDatabase 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", startox_targetorqb-targetbefore 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/shredderadminto confirm the recipes were imported.For the compact set, run
/shreddercompact shredder,generator, andbox, link the generator with ashredder_cable, and shred a part. See Compact Shredder.