Setup
Install and configure Snow Chains.
#Dependencies
Install oxmysql and zyke_lib, and configure zyke_lib's framework and inventory. See Dependencies.
#Resources
Place both
zyke_snowchainsandzyke_snowchains_assetsin your server's resources folder. Keep the folder names as they are.
#Item
Copy the matching definition from
zyke_snowchains/extras/items/ox_inventory.txtorzyke_snowchains/extras/items/qb-core.txtinto your inventory, and copyextras/items/images/256/snow_chain.pnginto its image folder.The item name must match
Config.Settings.items.chain, which issnow_chainby default. One item is one chain for one wheel. For ox_inventory, leaveconsumeunset so the framework's usable-item callback runs.For servers without the item, enable
Config.Settings.commandto fit chains through a command instead.
#Configuration
Edit
shared/unlocked/config.lua. Review the job restriction, blocked vehicle classes, snow handling and chain wear. Use the Config reference for the current defaults.Custom restrictions belong in
client/unlocked/can_checks.luaandserver/unlocked/can_checks.lua. See Can-Check Hooks.
#Start Order
Start the resources after their dependencies:
cfgensure oxmysql ensure zyke_lib ensure zyke_snowchains_assets ensure zyke_snowchainsThe
zyke_snowchainsdatabase table is created on the first start.Avoid restarting zyke_snowchains_assets while chains are out, as it can crash clients that still show the props. Restarting zyke_snowchains itself is safe.
#Vehicle Properties (Optional)
Chains are saved by plate out of the box. To also save them with the rest of the vehicle in your framework's vehicle properties, follow Vehicle Properties.
#Verify Gameplay
Set the weather to snow, use a
snow_chain, and fit it to a wheel. Drive to feel the difference, then remove the chain and check that it returns to your inventory with its wear. Store and take out the vehicle to check that fitted chains are kept.