# :racehorse: Horse and Wagon sharing
Documentation relating to the kd_horse_sharing.

:::: tabs
::: tab BUY
[Buy the script](https://jumpon-studios.com/redm/share-horse-wagon)
:::
::::
## 1. Installation
kd_horse_sharing is a standalone script. So you don't need a specific framework to use it. It's also mean it works with all framework (VORP, RedEM:RP, QBCore, …).

- Drag and drop the resource in your resources folder
  - kd_horse_sharing
- Add this ensure in your server.cfg
  - `ensure kd_horse_sharing`
- Congratulation, the Horse and Wagon sharing WINCH script is ready to be use !
  
## 2. Usage
This script will overwrite the feature when you press E to ride horse or climb inside wagon. 
If nobody are on, it will works exactly like the native game : you will take the control of it. 
If someone already control it, you will climb in passager. 

## 3. Config.lua
The configuration file is `config.lua` in the resource root. **Do not edit this file directly** as your changes may be lost during updates. Instead, use `overwriteConfig.lua` to store your customizations.

- **`config.lua`** - Default configuration maintained by developers. **Do not modify this file.**
- **`overwriteConfig.lua`** - This is where you place only the values you want to override.

### How to customize the configuration

1. Open `kd_horse_sharing/overwriteConfig.lua`
2. Find the value you want to change in `config.lua` (e.g., `Config.language`)
3. Copy only that line into `overwriteConfig.lua`
4. Edit the copied value to your liking

The script loads `config.lua` first, then `overwriteConfig.lua` overwrites only the values you redefine. This ensures your customizations are preserved when updating the script.

`kd_horse_sharing/config.lua`

```lua
Config = {}
Config.CanStealToNPC = true
Config.CanStealToPlayer = false
```
