For the complete documentation index, see llms.txt. This page is also available as Markdown.

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] 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.

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


Frequently Asked Questions (Q&A)

Design jobs are not offered

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.

The default plots are never mowed

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.

A plot with a property ID cannot be ordered

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

The van or the mower does not spawn

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.

A tool sits wrong in the hand

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.

The console lists outdated editable files

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.

Last updated