Setup
Install and configure the angle grinder.
#Dependencies
Install zyke_lib and configure the framework and inventory providers there. The Hardware Supplier is used through
ox_targetorqb-target, and the motor sound needs Sounds. See Dependencies.
#Resource & Items
Place the resource in your server's resources folder as
zyke_anglegrinder.Copy the matching definitions from
zyke_anglegrinder/extras/items/ox_inventory.txtintoox_inventory/data/items.lua, or fromzyke_anglegrinder/extras/items/qb-core.txtintoqb-core/shared/items.lua. The bundled definitions includeanglegrinder, the three discsanglegrinder_disc,anglegrinder_disc_pro, andanglegrinder_disc_elite, their broken itemsanglegrinder_disc_broken,anglegrinder_disc_pro_broken, andanglegrinder_disc_elite_broken, andanglegrinder_battery.Copy every icon from
extras/items/images/256/into the inventory's image directory, not only the ones named after items. The grinder's icon switches between them to show the fitted disc, a broken disc, or a missing battery.extras/items/images/256/artwork/holds an optional stylized set with the same file names.Keep
anglegrinderandanglegrinder_batterynon-stackable/unique. The grinder stores its fitted disc and battery in metadata, and each battery keeps its own charge.Older versions used grinder and grinder_* item names. When upgrading, follow extras/items/README.md: replace the item definitions and icons, rename the items in your shops and other resources, and rename stored items in your database. On grinders, also rename the discItem and image metadata values from grinder to anglegrinder. The resource does not migrate stored items.
#Configuration
Edit
shared/unlocked/config.lua. Review the item names, starter parts, disc tiers, the minigame, witnesses, keybinds, and the Hardware Supplier. Use the Config reference for current defaults.Custom action restrictions belong in
client/unlocked/can_checks.luaandserver/unlocked/can_checks.lua. Enforce trusted restrictions on the server. Your own busy logic, such as handcuffs or carrying, goes inIsPlayerHandsBusy()inclient/unlocked/can_checks.lua.Connect your dispatch resource in
OnIllegalGrindinserver/unlocked/hooks.lua. For Discord logs, copyextras/webhooks/anglegrinder.luatozyke_lib/webhooks/anglegrinder.luaand set a URL for each action you want logged.
#Start Order
Start your configured providers and their dependencies before the grinder:
cfgensure ox_target ensure zyke_sounds ensure zyke_lib ensure zyke_anglegrinder
ox_target(orqb-target) andzyke_soundsare optional; leave out the ones you do not use. Start resources that integrate with the grinder, such aszyke_wheelclamp, after it.The console warns on start about any configured item missing from your inventory.
#Verify Gameplay
Buy a grinder from the Hardware Supplier, or give yourself an
anglegrinder, and use it. With the grinder out, run/grindexampleto run an example grind in front of you; it needs thecommandACE permission. Check the disc and battery percentages on the keybind panel afterwards.To cut something real, approach a target from a supported resource, aim at its dot, and press E. See Using the Grinder.