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_gardenerand 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
Stop
qf_gardenerand startqf_gardener_v2instead. Scripts depending onqf_gardenerkeep working.Open Admin → Players → Import levels from V1, or run
gardenadmin import-v1in 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
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.
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)
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)
Last updated

