> For the complete documentation index, see [llms.txt](https://nayzeee-dev.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nayzeee-dev.gitbook.io/docs/nayzeee-scripts/nayzeee-wig-snatch/installation.md).

# Installation

1.**Ensure all dependencies are installed**\
\&#xNAN;*Be sure all required dependencies are installed, running, and utilizing the latest versions available.*

2. **Add Required Items**\
   \&#xNAN;*Add the required items to your inventory system.*

* For **ox\_inventory**:\
  Copy the contents from `INSTALL_/OX.txt` into your ox\_inventory items file.
* For **QBCore**:\
  Copy the contents from `INSTALL_/QB.txt` into your QBCore shared items file.

3. **Add Sounds**\
   \&#xNAN;*Install the required sound files for proper functionality.*

Copy the sounds from:

```
INSTALL_/SOUNDS/
```

Into your `xsound` resource directory.

4. **Add Images**\
   \&#xNAN;*Install the required item images for proper inventory display.*

Copy the images from:

```
INSTALL_/IMAGE/
```

Into your inventory image folder.

5. **Configure Script**\
   \&#xNAN;*Configure the script to your liking inside `config.lua`.*

Example configuration:

```lua
Config.SnatchDistance = 2.0
Config.SnatchTime = 900
Config.Cooldown.Duration = 60
```

6. **Drag script into resources directory**\
   \&#xNAN;*Place the `nayzeee-wigsnatch` folder into your server's resources directory. Be sure to ensure it within your `server.cfg` after all dependencies.*

```cfg
ensure ox_lib
ensure nayzeee-wigsnatch
```

7. **Restart/Start Server**\
   \&#xNAN;*Restart your server or start the resource. The script will automatically load and begin functioning.*

***

#### Troubleshooting

| Issue              | Solution                                                                 |
| ------------------ | ------------------------------------------------------------------------ |
| Can't snatch       | Ensure you are within `Config.SnatchDistance` and not on cooldown        |
| No item received   | Verify items were properly added to your inventory system                |
| Sounds not playing | Ensure `interact-sound` is installed and sounds were copied correctly    |
| Script not loading | Ensure `nayzeee-wigsnatch` is ensured in `server.cfg` after dependencies |

***
