# :deer: Hunting wagon Storage
Documentation relating to the kd_huntingwagon.

:::: tabs
::: tab BUY
[Buy the script](https://jumpon-studios.com/redm/hunting-wagon)
:::

::: tab PREVIEW
<iframe width="560" height="315" src="https://www.youtube.com/embed/CA1v7WScf_U?si=i_uMbhvL92IlO7Db" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
:::
::::

## 1. Installation
kd_huntingwagon 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_huntingwagon
- Add this ensure in your server.cfg
  - `ensure kd_huntingwagon`
- Congratulation, the Hunting Wagon storage script is ready to be use !

## 2. Usage
Carry carcass and go at the back of the Hunting Wagon to store it. <br>
Go back at the back to get out it when you are arrived where you want.

## 3. Config.lua file
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_hunterwagon/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_hunterwagon/shared/config.lua`

```lua
-------------------------------
-- DOCUMENTATION : https://docs.jumpon-studios.com/
--------------------------------

-------------------------------------------
-- DON'T EDIT THIS FILE
-- TO OVERWRITE CONFIG VALUE, USE overwriteConfig.lua file instead
-------------------------------------------

Config = {}

Config.Debug = false

Config.SizeDropzone = 2.0
Config.saveCarcassInDB = true --Need my stable script: https://jumpon-studios.com/redm/hunting-wagon

Config.wagonsCapacity = {     --list of compatible wagon (⚠ tarp is only available on huntercart01 ⚠)
  [`huntercart01`] = 1,
  [`cart03`] = 5,
  [`supplywagon`] = 4,
}
```

`kd_hunterwagon/shared/lang.lua`

```lua
-------------------------------------------
-- DON'T EDIT THIS FILE
-- TO TRANSLATE THE SCRIPT, USE overwriteLang.lua file instead
-------------------------------------------

function __(name) return Lang[name] or ("#" .. name) end

Lang = {}

Lang.NameWagonDrop = "Hunting Wagon: ~COLOR_GOLD~%d carcass"
Lang.NameWagonTake = "Hunting Wagon: ~COLOR_GOLD~%d/%d"
Lang.drop = "Drop %s"
Lang.take = "Take %s"
Lang.full = "This wagon is full"
Lang.empty = "This wagon is empty"
Lang.wrongType = "You can't store this object"
Lang.animalUnskinned = "You can't store unskinned animal"
```
