> For the complete documentation index, see [llms.txt](https://wiki.qfdevelopers.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.qfdevelopers.com/scripts/gardener-v2/additional-informations.md).

# Additional Informations

Page dedicated to Additional Informations about our Gardener \[V2].

#### Core Features

* **Universal Framework Support:** Works with ESX, QBCore and QBox, detected automatically, with ox\_target, qb-target, qtarget or a key prompt.
* **Everything in Game:** Plots, the depot, the catalog, client briefs, the economy and permissions are set in the admin panel. No coordinates in config files.
* **Self-Repairing Database:** Tables and columns are created and checked on every start. No SQL to import.
* **Crews of One to Four:** A leader, invites, a payout split and levels, with reconnecting players kept in the crew.
* **Upkeep and Design:** Mowing, hedges, leaves and weeds, and design jobs where the crew places and installs a whole garden for a client's brief.
* **Work in the World:** Every tool, heap, bag and installed item is a prop the players around see, with its own animations and effects.
* **Persistent Gardens:** Finished gardens stay on the map, overgrow and come back as upkeep jobs.
* **Garden Orders:** Players order gardens on plots or on their own property, and crews take the order as a job.
* **Banking V2 Integration:** Payouts to the bank account with income tax when [Banking \[V2\]](https://wiki.qfdevelopers.com/scripts/banking-v2.md) runs.
* **No Items:** Nothing to add to your inventory.
* **Backward Compatible:** Provides `qf_gardener` and imports V1 levels.

***

#### Server Security

The client only asks. The server decides who is in the crew, what was done, the rating and the pay, and the client never sends an amount or another player's id. Every request is rate limited per player and checked for permissions on the server. Taking and finishing a job, orders and payouts run in locked operations, so a double click never pays twice. A restart during a job cancels it cleanly and removes the van and props.

***

#### Moving from V1

1. Stop `qf_gardener` and start `qf_gardener_v2` instead. Scripts depending on `qf_gardener` keep working.
2. Open **Admin → Players → Import levels from V1**, or run `gardenadmin import-v1` in the server console.

The import copies levels and experience from the V1 table `gardener_cache`. It can run more than once and never lowers progress a player already has in V2. V1 work places are added as the six default upkeep plots on the first start.

***

#### Developer API (Hooks and Exports)

**Exports**

| Export                                                  | Side   | Returns                                                                  |
| ------------------------------------------------------- | ------ | ------------------------------------------------------------------------ |
| `exports.qf_gardener_v2:GetLevel(source or identifier)` | server | The gardener level, 0 for an unknown player.                             |
| `exports.qf_gardener_v2:IsWorking(source)`              | server | `true` while the player is in a crew with an active job.                 |
| `exports.qf_gardener_v2:OpenOrders()`                   | client | Opens the garden order form (a phone app or a housing menu can call it). |

**Server hooks (`server/editable.lua`)**

The locked code calls every hook protected. When one is missing or throws, the console says so once and the default is used. Money never moves inside a hook: payouts are computed and paid by the server, hooks only decide, show or react.

| Hook                                                | Called when                                                                                                       | Return                                                       |
| --------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| `GetPlayerDisplayName(source)`                      | A name is shown in the crew, the review screen, orders, logs and the admin panel.                                 | A string. Default: the framework character name.             |
| `CanWork(source)`                                   | The job center opens, a crew takes a job (for every member) and a player is invited. Runs after **Required job**. | `false` blocks. Default `true`.                              |
| `OnPayout(source, identifier, amount, tax, reason)` | A crew member was paid (already credited). A payout queued for an offline player is reported on their login.      | Nothing.                                                     |
| `OnJobFinished(data)`                               | A job was reviewed and paid. `data`: `kind`, `plotId`, `rating`, `total`, `members`.                              | Nothing.                                                     |
| `GetOwnedProperties(source, identifier)`            | A player opens the garden order form.                                                                             | A list of property ids or of `{ id, label }`. Default: none. |

**Client hooks (`client/editable.lua`)**

| Hook                                        | What it covers                                                                                   |
| ------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| `ShowHelp(message)` / `HideHelp()`          | Help text near the job center, the van, a task or a sketch.                                      |
| `GetInteractKey()`                          | The default interaction key. Default `'E'`.                                                      |
| `IsRestrained()`                            | Blocks interactions while cuffed or escorted.                                                    |
| `SetWorkClothes(enable)`                    | Work clothes at the locker room. Replace it with your clothing script if you prefer its outfits. |
| `IsInWorkClothes()`                         | Whether the player wears the work clothes.                                                       |
| `PlayAnimation(kind, overrides)`            | Animations, tools in hand, particles and sounds of every task (`ANIMATIONS` table).              |
| `GetAnimation(kind)`                        | Timing of picking up and putting down tools and of packing leaves.                               |
| `GetWorldProps()`                           | Grass tufts, weed accents, loose leaves, clippings and bag states (`WORLD` table).               |
| `WorldEffect(kind, coords, heading)`        | Bursts of dirt, clippings and leaves (`EFFECTS` table).                                          |
| `SetFuel(vehicle)`                          | Fuel of the van and the mower. Default: ox\_fuel, LegacyFuel, cdn-fuel, then the native level.   |
| `SetGPS(coords)`                            | The waypoint to a plot or back to base.                                                          |
| `DrawMarker(kind, coords, done, arrowOnly)` | Ground rings and arrows over work spots.                                                         |

***

#### Owned Properties for Garden Orders

A plot with a property ID (**Admin → Plots**) can only be ordered by the owner of that property. Return the ids the player owns from `GetOwnedProperties` in `server/editable.lua`.

{% tabs %}
{% tab title="qs-housing" %}

```lua
function Editable.GetOwnedProperties(source, identifier)
    if GetResourceState('qs-housing') ~= 'started' then return nil end
    local column = Bridge.framework == 'esx' and 'identifier' or 'citizenid'
    local rows = MySQL.query.await(('SELECT id, house FROM player_houses WHERE %s = ?'):format(column), { identifier }) or {}
    local list = {}
    for _, row in ipairs(rows) do list[#list + 1] = { id = tostring(row.id), label = row.house } end
    return list
end
```

{% endtab %}

{% tab title="ps-housing" %}

```lua
function Editable.GetOwnedProperties(source, identifier)
    if GetResourceState('ps-housing') ~= 'started' then return nil end
    local rows = MySQL.query.await('SELECT property_id, street, apartment FROM properties WHERE owner_citizenid = ?', { identifier }) or {}
    local list = {}
    for _, row in ipairs(rows) do
        list[#list + 1] = { id = tostring(row.property_id), label = row.apartment or ('%s %s'):format(row.street or '', row.property_id) }
    end
    return list
end
```

{% endtab %}

{% tab title="loaf\_housing" %}

```lua
function Editable.GetOwnedProperties(source, identifier)
    if GetResourceState('loaf_housing') ~= 'started' then return nil end
    local rows = MySQL.query.await('SELECT propertyid FROM loaf_properties WHERE owner = ?', { identifier }) or {}
    local list = {}
    for _, row in ipairs(rows) do list[#list + 1] = { id = tostring(row.propertyid), label = ('#%s'):format(row.propertyid) } end
    return list
end
```

{% endtab %}
{% endtabs %}

More examples (who may work, payouts, work clothes, notifications, colours) are in `docs/EXAMPLES.md` of the resource.

***

#### Frequently Asked Questions (Q\&A)

<details>

<summary>Design jobs are not offered</summary>

Design jobs need a design plot and at least one catalog item and client brief. The admin dashboard lists what is still missing. Draw a plot in **Admin → Plots → New plot → Draw in the world** and set its type to design or both.

</details>

<details>

<summary>The default plots are never mowed</summary>

The six default plots have mowing off, because the V1 places only record the work spots and not where the lawn is. Turn mowing on for a plot after checking that its outline covers only the lawn.

</details>

<details>

<summary>A plot with a property ID cannot be ordered</summary>

Fill the `GetOwnedProperties` hook for your housing script (see above). By default it returns nothing, so plots with a property ID are not orderable.

</details>

<details>

<summary>The van or the mower does not spawn</summary>

The work van `burrito_gardener` is streamed from the `stream` folder. The ride-on mower (`mower`) is a vanilla model. If one of them does not spawn, set another model in **Admin → Base and vehicles**.

</details>

<details>

<summary>A tool sits wrong in the hand</summary>

Run `/gardenadmin tune <kind>` (for example `hold_mower` or `trim`), move the tool with the arrows, the wheel, Shift and Alt, and paste the values printed in the F8 console into the `ANIMATIONS` table in `client/editable.lua`. It needs the **Base and vehicles** permission.

</details>

<details>

<summary>The console lists outdated editable files</summary>

After an update, compare the listed files with the **Editable file changes** section of the changelog, merge your changes into the new version and keep the new `-- @qf_editable` version line.

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://wiki.qfdevelopers.com/scripts/gardener-v2/additional-informations.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
