# INSTALLATION

## 1. **DOWNLOAD**

The first step is to download the product we have just purchased. To do this we will go to our [KEYMASTER](https://keymaster.fivem.net/asset-grants) account and search for **"Buty-Gardener"**.

## 2. DEPENDENCIES&#x20;

It is **extremely important** to install all the required dependencies, or the script will not function properly. These dependencies have been either developed by us or sourced from third parties. Below is a list of the essential dependencies:

#### **1. Unique and Exclusive Props**

* The script includes **unique and exclusive props**. These props are located in the folder called **Buty-Gardener-props**, which is included in the script itself.
* These props were created by the team member **Pugs** from **Fury Shop**. You can visit their shop via the following link: [Fury Shop Discord](https://discord.gg/8u6AbUgH38).

#### **2. Unique and Exclusive Animation**

* The script comes with a **exclusive animation**. This animation is also included in the folder **Buty-Gardener-props**.
* The animation was created by **BzZz**. You can check out their work at: [BzZz Tebex Store](https://bzzz.tebex.io/package/5774377).

#### **3. ox\_lib**

* **ox\_lib** is **essential** for this script to work. Please ensure that you always download the **latest version** from the official repository: [ox\_lib Releases](https://github.com/overextended/ox_lib/releases).

### **Ensure Order**

To ensure the proper functionality of the script, the order of the `ensure` commands in your `server.cfg` file should be as follows:

```plaintext
ensure ox_lib
ensure Buty-Gardener-props
ensure Buty-Gardener
```

Please **remember** that all **Buty scripts** should be placed **below the essential framework scripts** in your configuration. This ensures compatibility and proper loading order within your server.

## 2. INSTALLATION

### **SQL Installation**

Before using the **Buty-Gardener** script, you must install the necessary **SQL table**. This step is crucial to ensure that the script can store player data correctly.

Use the following SQL query to create the required table:

```sql
CREATE TABLE IF NOT EXISTS `buty_gardener` (
  `identifier` varchar(46) DEFAULT NULL,
  `experience` int(11) NOT NULL,
  `level` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
```

Ensure that this table is created in your database before running the script.

## 3. CONFIG

Ensure you fill out the **configuration file** carefully! Below is the default configuration for **Buty-Gardener**:

{% tabs %}
{% tab title="CONFIG" %}

```lua
local esxHas = GetResourceState('es_extended') == 'started'
local qbHas = GetResourceState('qb-core') == 'started'
Locales = Locales or {}

Configuration = {
    Framework = esxHas and 'esx' or qbHas and 'qb' or 'esx',
    Mysql = 'oxmysql', -- Database type: 'oxmysql', 'mysql-async', or 'ghmattisql'
    UseTarget = false, -- Activate it if you want to use target. Set to false if you want floating text
    Language = 'es', -- 'en' or 'es' by default (you can create more)
    RequiredJob = "police", -- Required job to perform tasks, set to "none" if no job is required
    RequireJobFromAllGroup = false, -- If true, all group members must have the job; if false, only the leader needs the job
    xprequired = 10000, -- Required experience to level up 
    UseQSinventory = true,
    DefaultRewardType = 'cash', -- Default reward type: 'cash', 'bank', or 'item'
    DefaultItemName = 'bread' -- Default item name if 'item' is selected as reward type
}

StartPoint = "THIS IS AN EXAMPLE, IN THE FINAL SCRIPT IT IS CORRECT" -- Starting point coordinates

Pay = {
    coord = "THIS IS AN EXAMPLE, IN THE FINAL SCRIPT IT IS CORRECT", -- Coordinates and model for the payment NPC
    pedmodel = "s_m_m_gardener_01", -- Model for the payment NPC
}

Workclothes = "THIS IS AN EXAMPLE, IN THE FINAL SCRIPT IT IS CORRECT" -- Coordinates for work clothes

Clothes = {

    male = {
        tshirt_1 = 15, tshirt_2 = 0,
        torso_1 = 247, torso_2 = 7,
        decals_1 = 0, decals_2 = 0,
        arms = 21,
        pants_1 = 47, pants_2 = 1,
        shoes_1 = 94, shoes_2 = 6,
        chain_1 = 0, chain_2 = 0,
        helmet_1 = 60, helmet_2 = 4,
        ears_1 = -1, ears_2 = 0,
        bproof_1 = 0, bproof_2 = 0,
    },
    female = {
        tshirt_1 = 220, tshirt_2 = 0,
        torso_1 = 43,   torso_2 = 0,
        decals_1 = 0,   decals_2 = 0,
        arms = 36,
        pants_1 = 137,   pants_2 = 2,
        shoes_1 = 24,   shoes_2 = 0,
        chain_1 = -1,    chain_2 = 0,
        helmet_1 = -1,  helmet_2 = 0,
        bproof_1 = 0,  bproof_2 = 0
    }
}

Vehicle = {
    coord = "THIS IS AN EXAMPLE, IN THE FINAL SCRIPT IT IS CORRECT", -- Coordinates for vehicle interaction and spawn
    spawnvehicle = "THIS IS AN EXAMPLE, IN THE FINAL SCRIPT IT IS CORRECT", -- Coordinates for vehicle spawn
    model = "burrito3", -- Vehicle model
}

Webhooks = {  -- Here you can configure webhooks for discord

    Active = false, -- true: you will activate the webhooks; false: you will disable webhooks
    Link = "", -- webhook link
}


Tasks = {
    [1] = {
        Info_Task = {
            Name = "GREEN PARK", -- Task information
            LevelRequired = 1, -- Level required to start the task
            Exp = 400, -- Experience points rewarded for completing the task
            Money = 90, -- Money rewarded for completing the task
        },

        Blip_Tasks = {
            radius = 50.0, 
            coord = "THIS IS AN EXAMPLE, IN THE FINAL SCRIPT IT IS CORRECT"
        },

        Points_Task = {
            ['cut_grass'] = {
                {
                    coord = "THIS IS AN EXAMPLE, IN THE FINAL SCRIPT IT IS CORRECT", 
                    take = false,
                    prop = "prop_weeddry_nxg04"
                },
                {
                    coord = "THIS IS AN EXAMPLE, IN THE FINAL SCRIPT IT IS CORRECT", 
                    take = false,
                    prop = "prop_weeddry_nxg04"
                },
            },            
        }
    },
    [2] = {
        Info_Task = {
            Name = "CEMETERY", -- Task information
            LevelRequired = 2, -- Level required to start the task
            Exp = 700, -- Experience points rewarded for completing the task
            Money = 200, -- Money rewarded for completing the task
        },

        Blip_Tasks = {
            radius = 50.0, 
            coord = "THIS IS AN EXAMPLE, IN THE FINAL SCRIPT IT IS CORRECT"
        },

        Points_Task = {
            ['cut_grass'] = {
                {
                    coord = "THIS IS AN EXAMPLE, IN THE FINAL SCRIPT IT IS CORRECT", 
                    take = false,
                    prop = "prop_weeddry_nxg04"
                },
            },            
        }
    },
}

-- The code continues beyond this point. This is just an example; in the final script, all details are correct.

```

{% endtab %}

{% tab title="OPEN FILES" %}

### **Framework Utility Functions**

Both the **client** and **server** folders contain a **framework folder** packed with a wide variety of utility functions, all open for modification to fit your specific needs. Inside, you will find essential features such as:

* **Progress Bar**
* **Notifications**
* **Blips**
* And much more!

Feel free to explore and adjust these functions to customize the script's behavior and enhance its integration with your server.

<figure><img src="/files/AiG1BkRNaGNoLGz9bOLS" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="LOCALES" %}

### Language **(Locales)**

The script includes a **locales folder**, where you'll find carefully translated versions of the entire script. It comes with support for **multiple languages**, ensuring broad compatibility with different communities.

If you don't find your preferred language among the available options, **don't worry**—you can easily modify or add new translations to suit your needs!

<figure><img src="/files/smau5Lcs7Tlk8reUJkj6" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

{% hint style="success" %}
**If you want to edit the aesthetics or design. You have the HTML open so you can modify the style and everything as you want.**

The script is **RESPONSIVE** for all resolutions as well.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://buty-documentation.gitbook.io/home/guides/gardener-job/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
