Documentation

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_snowchains and zyke_snowchains_assets in your server's resources folder. Keep the folder names as they are.

#Item

Copy the matching definition from zyke_snowchains/extras/items/ox_inventory.txt or zyke_snowchains/extras/items/qb-core.txt into your inventory, and copy extras/items/images/256/snow_chain.png into its image folder.

The item name must match Config.Settings.items.chain, which is snow_chain by default. One item is one chain for one wheel. For ox_inventory, leave consume unset so the framework's usable-item callback runs.

For servers without the item, enable Config.Settings.command to 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.lua and server/unlocked/can_checks.lua. See Can-Check Hooks.

#Start Order

Start the resources after their dependencies:

cfg
ensure oxmysql
ensure zyke_lib
ensure zyke_snowchains_assets
ensure zyke_snowchains

The zyke_snowchains database 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.

#Weather

Snowy roads follow the weather. If your weather script has no snow weather, force them with /snowroads on or the SetSnowOverride export. See Commands.

#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.