Documentation

Pepper Farmer

Farming career from level 1 to 100 with field leases, machinery, animals, production chains, a dynamic market and co-ops – ESX, QBCore and Qbox.

Overview

Pepper Farmer is a long-term farming career (~300 hours to level 100) for ESX, QBCore and Qbox. Players lease beds and fields, grow 47 crops and 3 legendary varieties, work large fields with machines on GTA vanilla vehicles, keep ten animal species, process their harvest in 40 machines with 112 recipes and sell on a dynamic market or through contracts. Every level unlocks something. Everything is managed in the farm tablet (F6 / /farmer) – at the Grapeseed farm HQ office also via ox_target.

  • Field leases for 24 hours, the lease limit grows with your level
  • Work large fields lane by lane with machines, quality from Normal to Master class
  • Animals, real-time production chains (also offline), ten dealers, farm shop, weekly market and contracts
  • Co-ops from level 70, challenges, achievements and prestige from level 100
  • Admin tab in the tablet: move places and fields in game, manage players, leases and the market

Requirements

Dependency Required/optional Used for Link
FiveM server build 7290 or newer required Per fxmanifest.lua (/server:7290) https://runtime.fivem.net/artifacts/fivem/
OneSync required Machines, animals and props on the server https://docs.fivem.net/docs/scripting-reference/onesync/
ESX Legacy, QBCore or Qbox required Money, character, names (Config.Framework) https://github.com/esx-framework/esx_core · https://github.com/qbcore-framework/qb-core · https://github.com/Qbox-project/qbx_core
oxmysql required 29 tables farmer_* (MySQL 5.7+ / MariaDB 10.3+) https://github.com/overextended/oxmysql
ox_lib required Helpers https://github.com/overextended/ox_lib
ox_inventory required Items with quality, farm storage, harvest basket https://github.com/overextended/ox_inventory
ox_target required Interactions with crops, animals, machines, dealers, lease boards https://github.com/overextended/ox_target

qb-inventory and qb-target are not supported.

Installation

  1. Download the resource from the Cfx.re portal (Granted Assets) and extract it to resources/[pepper]/pepper_farmer.

    Do not rename the folder. The resource must be called pepper_farmer, otherwise the tablet does not open.

  2. config/config.lua: set Config.Framework (default 'esx', otherwise 'qbcore', 'qbox' or 'auto') and Config.Locale ('de' / 'en').

  3. Items: add the contents of install/ox_items_en.lua (or ox_items_de.lua) to ox_inventory/data/items.lua – inside the table, right before the very last }. No extra return {. If an item already exists (e.g. bread), delete the old entry.

  4. Harvest basket: add the contents of install/ox_containers.lua to ox_inventory/modules/items/containers.lua – before the line return containers at the end of the file.

  5. Start it in your server.cfg after its dependencies:

ensure oxmysql
ensure ox_lib
ensure es_extended      # or qb-core or qbx_core
ensure ox_inventory
ensure ox_target
ensure pepper_farmer

add_ace group.admin pepper_farmer.admin allow
  1. Restart the server completely (ox_inventory only reads new items on its own start). The console shows Pepper Farmer v1.0.0 started (framework: esx) with your framework.

Database: You do not need to import anything. Pepper Farmer creates all 29 tables (farmer_*) itself on start (server/db.lua, CREATE TABLE IF NOT EXISTS). Only if your database user is not allowed to create tables, import install/pepper_farmer.sql beforehand with HeidiSQL or phpMyAdmin. If the console says a schema block failed, this is the fallback.

Items per inventory:

Inventory File Target Images
ox_inventory install/ox_items_en.lua / ox_items_de.lua (265 items) ox_inventory/data/items.lua optional: PNG named after the item in ox_inventory/web/images/
ox_inventory (harvest basket) install/ox_containers.lua ox_inventory/modules/items/containers.lua –

Other inventories are not supported.

First test

  1. Press F6 or type /farmer: the farm tablet opens.
  2. In the tablet → tab Fields, lease a free bed at the Grapeseed farm HQ.
  3. Buy a hoe and a watering can at the garden tools shop and seeds at the Grapeseed seed shop.
  4. Hoe, sow and water the bed via ox_target, then harvest after the growth time.
  5. Sell the harvest at a dealer and check the XP you earned in the tablet.

Configuration

File Controls
config/config.lua Framework, language, command/key, accounts, quality tiers, security, admin, co-op, farm HQ
config/levels.lua XP curve, ranks, features per level, lease limit, level rewards, prestige
config/crops.lua · fields.lua · tools.lua · weather.lua Crops, fields and lease rules, tools/fertiliser/diseases, seasons and weather
config/vehicles.lua Vehicles and implements, depot, workshop, work menu key
config/animals.lua Animal species, pens, feed, breeding, truffle hunting
config/production.lua Machines and recipes
config/economy.lua · contracts.lua · challenges.lua · achievements.lua Dealers, market, contracts, challenges, achievements
config/upgrades.lua Farm upgrades
config/world.lua Visible objects, NPCs and blips at the places
config/items/*.lua All items
config/server.lua Discord webhook (server only)
locales/de · locales/en All texts

Basics

Config.Locale = 'de'
Config.Framework = 'esx'
Config.Command = 'farmer'
Config.Key = 'F6'
Config.Money = {
    sales = 'money',
    contracts = 'bank',
    rewards = 'bank',
    purchases = 'cash_then_bank',
}
Option Default Description
Config.Locale 'de' 'de' or 'en'
Config.Framework 'esx' 'esx', 'qbcore', 'qbox' or 'auto' (detects qbx_core → es_extended → qb-core)
Config.Command / Config.Key 'farmer' / 'F6' Command and default key for the tablet
Config.Money.sales 'money' Account for dealer sales
Config.Money.contracts / rewards 'bank' Account for contracts and rewards
Config.Money.purchases 'cash_then_bank' Purchases: cash first, then bank
Config.Admin.groups { 'admin', 'superadmin', 'god' } Framework groups with admin rights
Config.Coop.maxMembers 6 Co-op members including the owner
Config.Debug false Extra console output

Leases, XP and economy

Option File Default Description
Config.FieldRules.leaseHours fields.lua 24 Lease duration in hours
Config.FieldRules.repeatCooldownMin fields.lua 30 Lock for the previous tenant on the same field (minutes)
Config.FieldRules.priceMult fields.lua 1.0 Factor on all lease prices
Config.Levels.globalXpMultiplier levels.lua 1.0 All XP × factor
Config.Economy.globalMultiplier economy.lua 1.0 Sales, contract, challenge and achievement rewards
Config.Machinery.menuKey vehicles.lua 'K' Key for the work menu in a vehicle
Config.Weather.source weather.lua 'own' Built-in farm weather

Custom content: New crops, animals, recipes, machines and vehicles are only added in the config – the level field is the single source for unlocking, and the tablet and level overview pick them up automatically. Afterwards export new items with farmer_items en and add them to ox_inventory.

Coordinates

Fields, lease boards, pens, machines, dealers, depot and farm HQ are approximations from map data. Drive past them once before going live. The easiest way to move them is in game: tablet → tab Admin → Locations or Fields → stand at the right spot → Set to my position. The change applies to all players right away and is stored in the database (table farmer_locations), so an update does not overwrite it. farmer_locations_export writes all changes to install/location_overrides.lua.

The defaults live in open configs:

What File
Fields, beds, lease boards, lanes of large fields config/fields.lua
Pens (trough, water, collection point, board) config/animals.lua (pen)
Production machines config/production.lua (location)
Dealers, farm shop, show config/economy.lua
Machine depot, workshop config/vehicles.lua
Farm HQ (office, farm storage) config/config.lua (Config.HQ)

Gameplay

  1. Lease: lease a free bed or field at the lease board or in the tablet for 24 hours – the lease limit grows with your level.
  2. Grow: buy seeds at the farm supply store, hoe, sow, water, fertilise, protect – via ox_target at the plant. Large fields are worked lane by lane with machines.
  3. Harvest: quality (Normal to Master class) depends on care, water, fertiliser, tools and harvest timing.
  4. Process: buy machines and queue recipes – production runs in real time, even offline.
  5. Sell: to ten dealers (each buys different goods), in your own farm shop, at the weekly market or through contracts.
  6. Expand: animals, upgrades, co-op, challenges, achievements – and prestige at level 100.

Framework integration

Money (cash/bank), character identifier and names come from bridge/server/<framework>.lua, the inventory from bridge/server/inventory.lua (ox_inventory), interactions from bridge/client/target.lua (ox_target). All bridges are open and can be adapted.

Commands and permissions

Command Who What
/farmer or F6 everyone Open or close the farm tablet
/farmadmin setlevel <id> <level> Admin Set the level (1–100)
/farmadmin addxp <id> <amount> Admin Give XP
/farmadmin reset <id> Admin Reset the character's level, XP, prestige and stats
/farmadmin givequality <id> <item> <count> <1–5> Admin Give an item with quality
farmer_items de|en Server console Rebuild the ox_inventory item list from config/items/*.lua
farmer_locations_export Server console or admin Write positions changed in the admin tab to install/location_overrides.lua

/farmadmin works in chat and in the server console; <id> is the server ID of a player who is online. Change the command name in Config.Admin.command. The Admin tab in the tablet can set level, XP and reset players who are offline, too.

Permissions: Admin is whoever has the ACE pepper_farmer.admin (Config.Admin.ace) or a framework group from Config.Admin.groups:

add_ace group.admin pepper_farmer.admin allow
add_principal identifier.license:YOUR_LICENSE group.admin

All admin actions are written to the audit log (farmer_audit) and optionally to the Discord webhook (ServerConfig.Webhook in config/server.lua).

Keys:

Key Purpose
F6 Farm tablet (Config.Key)
K (in a vehicle) Machine work menu: operation, seed/agent, stop, park (Config.Machinery.menuKey)
ox_target (usually Alt) Interactions with crops, animals, machines, dealers, lease boards, office and farm storage

Players change F6 and K under Settings → Key Bindings → FiveM.

Exports

exports.pepper_farmer:getVersion()               -- Pepper Farmer version
exports.pepper_farmer:getProfile(src)            -- profile (level, XP, rank, farm …)
exports.pepper_farmer:getLevel(src)              -- level, or nil if not loaded
exports.pepper_farmer:hasUnlock(src, kind, key)  -- e.g. kind = 'feature', key = 'coop'

The exports are read-only (server). There is intentionally no export that lets other resources create money, XP or items.

local level = exports.pepper_farmer:getLevel(source)
if level and level >= 20 then
    -- …
end

FAQ

Do I need to import the SQL file?

No. The 29 tables are created automatically on first start. Only if your database user is not allowed to create tables do you import install/pepper_farmer.sql by hand.

The resource stays inactive.

If the console says Pepper Farmer could not reach the database and stays inactive, check mysql_connection_string. If it says a schema block failed, the database user lacks rights: import install/pepper_farmer.sql.

The console shows started (framework: standalone) or a red framework warning.

Config.Framework does not match your server or the framework starts after Pepper Farmer. Check the setting and the order in your server.cfg.

Items show their internal name, e.g. tomato.

The items are missing in ox_inventory/data/items.lua. Add install/ox_items_en.lua and restart the server completely.

No such export … in resource ox_inventory

ox_inventory did not start, almost always because of a typo in data/items.lua (a second return {, a missing comma) or in containers.lua (block after return containers). Look for the red ox_inventory error further up in the console.

The harvest basket accepts nothing.

The block from install/ox_containers.lua is missing in ox_inventory/modules/items/containers.lua. Add it and restart.

The tablet does not open.

Check the console for Pepper Farmer v… started and the folder name pepper_farmer. If another script uses F6, use /farmer or change the key in your FiveM settings.

Lease boards or dealers float or are stuck in the ground.

The coordinates are approximations. Set them to the right spot in the tablet → Admin → Locations or Fields. The values are stored in the database and survive updates.

A machine does not detect the field.

Re-drive the lanes in the admin tab → Fields, set Config.Debug = true for testing. A lane counts once about 80 % of its length has been driven.

Does it work with qb-inventory or qb-target?

No. Pepper Farmer needs ox_inventory (items, farm storage, harvest basket) and ox_target.

Do I need custom vehicle or animal models?

No, everything uses GTA vanilla models. Addon models can be set in config/vehicles.lua.

Do leases run while offline?

Yes. On expiry, ripe crops go to the farm storage (one quality tier lower) and unripe plants are lost. Afterwards the field is locked for you for 30 minutes.

Can players farm together?

From level 70 as a co-op with up to 6 members (Config.Coop.maxMembers).

Can I raise XP or income for an event?

Yes: Config.Levels.globalXpMultiplier in config/levels.lua and Config.Economy.globalMultiplier in config/economy.lua, then restart the resource.

How do I update to a new version?

Back up config/, delete the old folder, extract the new version and carry over your settings. Only re-add items and the harvest basket if the changelog asks for it. Player data and adjusted positions live in the database.

Support

Discord → ticket (category "Script Support") at https://discord.gg/6NaFJWKDYu, link your purchase with /verify first.

Permanently tested on the Pepper Scripts dev server.

Changelog

Current: 1.0.0 (2026-09-27), first release. Prepared but not released yet: optional Pepper Weather integration (Config.Weather.source = 'pepper_weather'). All changes are listed in CHANGELOG.md in the resource.


Found a mistake? Report it on Discord.