> For the complete documentation index, see [llms.txt](https://dragon-heart-studios.gitbook.io/dragonheartstudios/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dragon-heart-studios.gitbook.io/dragonheartstudios/scripts/dhs-brewsandwines/integration.md).

# Integration

{% hint style="warning" %}
WARNING: ONLY MESS WITH THESE IF YOU KNOW WHAT YOU ARE DOING!!!!
{% endhint %}

### Reset Clothing

{% hint style="info" %}
By Default we use Illenium appearance however you can change this to whatever you use

* DHS-BrewsAndWines/client/editablefunctions\_cl.lua
  {% endhint %}

```lua
function ResetClothing()
    if Config.Clothing == "illenium-appearance" then
        TriggerEvent("illenium-appearance:client:reloadSkin")
    elseif Config.Clothing == "custom" then
        --Custom Clothing System Here
    end
end
```

***

### Fuel System

{% hint style="info" %}
We support many different fuel systems and we make it quite easy to add your own
{% endhint %}

```lua
local fuelEvent = nil

function RefuelVehicle(vehicle)
    if GetResourceState('ox_fuel') ~= 'started' then
      exports[fuelEvent]:SetFuel(vehicle, 100)
      return
    elseif GetResourceState('ox_fuel') == 'started' then
      Entity(vehicle).state.fuel = 100.0
      return
    end
    print('ERROR: No Fuel Resource Detected')
    fuelEvent = nil
end

CreateThread(function()
    if GetResourceState('LegacyFuel') == 'started' then
       fuelEvent = 'LegacyFuel'
       return
    end
    if GetResourceState('cdn-fuel') == 'started' then
      fuelEvent = 'cdn-fuel'
      return
    end
    if GetResourceState('BigDaddy-Fuel') == 'started' then
      fuelEvent = 'BigDaddy-Fuel'
      return
    end
    if GetResourceState('ps-fuel') == 'started' then
      fuelEvent = 'ps-fuel'
      return
    end
    if GetResourceState('okokGasStation') == 'started' then
      fuelEvent = 'okokGasStation'
      return
    end
    if GetResourceState('qs-fuelstations') == 'started' then
        fuelEvent = 'qs-fuelstations'
        return
    end
    if GetResourceState('lc_fuel') == 'started' then
        fuelEvent = 'lc_fuel'
        return
    end
end)
```

***

### Give Keys Function

{% hint style="info" %}
If your using a different vehicle key system put it here
{% endhint %}

```lua
function GiveKeys(plate)
    if Config.VehicleKeys == 'qb-vehiclekeys' then
        TriggerEvent("vehiclekeys:client:SetOwner", plate)
    else
        if Config.Debug then
            print("No Vehicle Key System Selected")
        end
    end
end
```

***

### Lockpick Minigame

{% hint style="info" %}
The Lockpick minigame used for breaking into beehives
{% endhint %}

```lua
function LockpickMinigame(securityLevel)
  local success = false
  if securityLevel == "low" then
    success = lib.skillCheck({'easy', 'easy', 'easy', 'easy'}, {'w', 'a', 's', 'd'})
  elseif securityLevel == "medium" then
    success = lib.skillCheck({'medium', 'medium', 'medium', 'medium'}, {'w', 'a', 's', 'd'})
  elseif securityLevel == "high" then
    success = lib.skillCheck({'hard', 'hard', 'hard', 'hard'}, {'w', 'a', 's', 'd'})
  end
  if success then
      return true
  else
      return false
  end
end
```

***

### Grape Picking Minigame

{% hint style="info" %}
The minigame used to pick grapes
{% endhint %}

```lua
function GrapePickingMinigame()
  local success = false
  success = lib.skillCheck({'easy', 'easy', 'easy', 'easy'}, {'w', 'a', 's', 'd'})
  if success then
    return true
  else
    return false
  end
end
```

***

### If HoneyUsesMetadata is false

{% hint style="info" %}
If  Config.HoneyUsesMetadata is false refer to this for installation
{% endhint %}

> **1) Make sure to install the optional items these will be**
>
> * jar\_of\_floral\_honey
> * jar\_of\_spiced\_honey
> * jar\_of\_grape\_infused\_honey
> * jar\_of\_moonlight\_honey
> * jar\_of\_smoked\_honey
> * jar\_of\_resin\_honey
> * jar\_of\_golden\_honey
> * jar\_of\_floral\_golden\_honey
> * jar\_of\_spiced\_golden\_honey
> * jar\_of\_grape\_infused\_golden\_honey
> * jar\_of\_moonlight\_golden\_honey
> * jar\_of\_smoked\_golden\_honey
> * jar\_of\_resin\_golden\_honey
> * jar\_of\_rotten\_honey
> * jar\_of\_floral\_rotten\_honey
> * jar\_of\_spiced\_rotten\_honey
> * jar\_of\_grape\_infused\_rotten\_honey
> * jar\_of\_moonlight\_rotten\_honey
> * jar\_of\_smoked\_rotten\_honey
> * jar\_of\_resin\_rotten\_honey

> 2\) Go into the peds\_config.lua and change the Honey Buyer to this

```lua
{
        model = "a_m_m_farmer_01",
        coords = vector4(1793.6, 4594.93, 36.68, 181.71),
        type = "honeyBuyer",
        shopName = "Tom's Honey Preserve",
        sellItems = {
            {
                name = "honey_comb",
                label = "Honey Comb",
                sellPrice = 500,
                externalImage = 'https://i.gyazo.com/c6b78eb1940b5cb19633d0a01430e965.png',
            },
            {
                name = "jar_of_honey",
                label = "Jar of Normal Honey",
                type = "normal",
                secondaryType = "normal",
                sellPrice = 1000,
                externalImage = 'https://i.gyazo.com/730b4a2c59f417c158439f539f59033a.png',
            },
            -- {
            --     name = "jar_of_honey",
            --     label = "Jar of Golden Honey",
            --     type = "golden",
            --     secondaryType = "normal",
            --     sellPrice = 2000,
            --     externalImage = 'https://i.gyazo.com/730b4a2c59f417c158439f539f59033a.png',
            -- },
            -- {
            --     name = "jar_of_honey",
            --     label = "Jar of Floral Honey",
            --     type = "normal",
            --     secondaryType = "wildflower",
            --     sellPrice = 2000,
            --     externalImage = 'https://i.gyazo.com/730b4a2c59f417c158439f539f59033a.png',
            -- },
            -- {
            --     name = "jar_of_honey",
            --     label = "Jar of Floral Golden Honey",
            --     type = "golden",
            --     secondaryType = "wildflower",
            --     sellPrice = 3000,
            --     externalImage = 'https://i.gyazo.com/730b4a2c59f417c158439f539f59033a.png',
            -- },
            -- {
            --     name = "jar_of_honey",
            --     label = "Jar of Spiced Honey",
            --     type = "normal",
            --     secondaryType = "spice",
            --     sellPrice = 3000,
            --     externalImage = 'https://i.gyazo.com/730b4a2c59f417c158439f539f59033a.png',
            -- },
            -- {
            --     name = "jar_of_honey",
            --     label = "Jar of Spiced Golden Honey",
            --     type = "golden",
            --     secondaryType = "spice",
            --     sellPrice = 4000,
            --     externalImage = 'https://i.gyazo.com/730b4a2c59f417c158439f539f59033a.png',
            -- },
            -- {
            --     name = "jar_of_honey",
            --     label = "Jar of Grape-Infused Honey",
            --     type = "normal",
            --     secondaryType = "vineyard",
            --     sellPrice = 4000,
            --     externalImage = 'https://i.gyazo.com/730b4a2c59f417c158439f539f59033a.png',
            -- },
            -- {
            --     name = "jar_of_honey",
            --     label = "Jar of Grape-Infused Golden Honey",
            --     type = "golden",
            --     secondaryType = "vineyard",
            --     sellPrice = 5000,
            --     externalImage = 'https://i.gyazo.com/730b4a2c59f417c158439f539f59033a.png',
            -- },
            -- {
            --     name = "jar_of_honey",
            --     label = "Jar of Moonlight Honey",
            --     type = "normal",
            --     secondaryType = "lunar",
            --     sellPrice = 5000,
            --     externalImage = 'https://i.gyazo.com/730b4a2c59f417c158439f539f59033a.png',
            -- },
            -- {
            --     name = "jar_of_honey",
            --     label = "Jar of Moonlight Golden Honey",
            --     type = "golden",
            --     secondaryType = "lunar",
            --     sellPrice = 6000,
            --     externalImage = 'https://i.gyazo.com/730b4a2c59f417c158439f539f59033a.png',
            -- },
            -- {
            --     name = "jar_of_honey",
            --     label = "Jar of Smoked Honey",
            --     type = "normal",
            --     secondaryType = "ember",
            --     sellPrice = 6000,
            --     externalImage = 'https://i.gyazo.com/730b4a2c59f417c158439f539f59033a.png',
            -- },
            -- {
            --     name = "jar_of_honey",
            --     label = "Jar of Smoked Golden Honey",
            --     type = "golden",
            --     secondaryType = "ember",
            --     sellPrice = 7000,
            --     externalImage = 'https://i.gyazo.com/730b4a2c59f417c158439f539f59033a.png',
            -- },
            -- {
            --     name = "jar_of_honey",
            --     label = "Jar of Resin Honey",
            --     type = "normal",
            --     secondaryType = "pine",
            --     sellPrice = 7000,
            --     externalImage = 'https://i.gyazo.com/730b4a2c59f417c158439f539f59033a.png',
            -- },
            -- {
            --     name = "jar_of_honey",
            --     label = "Jar of Resin Golden Honey",
            --     type = "golden",
            --     secondaryType = "pine",
            --     sellPrice = 8000,
            --     externalImage = 'https://i.gyazo.com/730b4a2c59f417c158439f539f59033a.png',
            -- },
            -- Only Use If Config.HoneyUsesMetadata Is false
            {
                name = "jar_of_golden_honey",
                label = "Jar of Golden Honey",
                sellPrice = 1000,
                externalImage = 'https://i.gyazo.com/730b4a2c59f417c158439f539f59033a.png',
            },
            {
                name = "jar_of_floral_honey",
                label = "Jar of Floral Honey",
                sellPrice = 1000,
                externalImage = 'https://i.gyazo.com/730b4a2c59f417c158439f539f59033a.png',
            },
            {
                name = "jar_of_spiced_honey",
                label = "Jar of Spiced Honey",
                sellPrice = 1000,
                externalImage = 'https://i.gyazo.com/730b4a2c59f417c158439f539f59033a.png',
            },
            {
                name = "jar_of_grape_infused_honey",
                label = "Jar of Grape-Infused Honey",
                sellPrice = 1000,
                externalImage = 'https://i.gyazo.com/730b4a2c59f417c158439f539f59033a.png',
            },
            {
                name = "jar_of_moonlight_honey",
                label = "Jar of Moonlight Honey",
                sellPrice = 1000,
                externalImage = 'https://i.gyazo.com/730b4a2c59f417c158439f539f59033a.png',
            },
            {
                name = "jar_of_smoked_honey",
                label = "Jar of Smoked Honey",
                sellPrice = 1000,
                externalImage = 'https://i.gyazo.com/730b4a2c59f417c158439f539f59033a.png',
            },
            {
                name = "jar_of_resin_honey",
                label = "Jar of Resin Honey",
                sellPrice = 1000,
                externalImage = 'https://i.gyazo.com/730b4a2c59f417c158439f539f59033a.png',
            },
            {
                name = "jar_of_floral_golden_honey",
                label = "Jar of Floral Golden Honey",
                sellPrice = 1000,
                externalImage = 'https://i.gyazo.com/730b4a2c59f417c158439f539f59033a.png',
            },
            {
                name = "jar_of_spiced_golden_honey",
                label = "Jar of Spiced Golden Honey",
                sellPrice = 1000,
                externalImage = 'https://i.gyazo.com/730b4a2c59f417c158439f539f59033a.png',
            },
            {
                name = "jar_of_grape_infused_golden_honey",
                label = "Jar of Grape-Infused Golden Honey",
                sellPrice = 1000,
                externalImage = 'https://i.gyazo.com/730b4a2c59f417c158439f539f59033a.png',
            },
            {
                name = "jar_of_moonlight_golden_honey",
                label = "Jar of Moonlight Golden Honey",
                sellPrice = 1000,
                externalImage = 'https://i.gyazo.com/730b4a2c59f417c158439f539f59033a.png',
            },
            {
                name = "jar_of_smoked_golden_honey",
                label = "Jar of Smoked Golden Honey",
                sellPrice = 1000,
                externalImage = 'https://i.gyazo.com/730b4a2c59f417c158439f539f59033a.png',
            },
            {
                name = "jar_of_resin_golden_honey",
                label = "Jar of Resin Golden Honey",
                sellPrice = 1000,
                externalImage = 'https://i.gyazo.com/730b4a2c59f417c158439f539f59033a.png',
            }, 
        }
    },
```

> 3\) Installation for not using metadata has finished good job!

***
