Growing Everywhere

A farming and plant-growing system for FiveM, supporting legal and illegal crops, custom growing zones, and dynamic markets.

Installation

1

Add Resources to Server

Drop the resources into your server’s resources directory:

  • cfx-orchid-growing

  • cfx-orchid-growing-props

2

Install Dependencies

Follow the installation guide for Orchid Bridge.

3

Configure

Edit the following files in data folder to customize the system:

  • config.lua — main settings, shops, and buyers

  • zones.lua — farming zones and environmental modifiers

  • plants.lua — plant definitions, stages with props, and yields

4

Start the Resources

Ensure both resources are loaded in your server.cfg:

ensure cfx-orchid-growing
ensure cfx-orchid-growing-props

Configuration

The config.lua file allows you to fine-tune the farming system. Below is an overview of the available settings.

General Settings

Key
Description
Default

spilledWateringPercentage

Durability lost from the watering can when spilling water accidentally.

15

wateringPercentage

Maximum durability used when watering a pot.

30

defaultHumidity

Humidity level in places with no zone or zone without specified value.

20.0

defaultSun

Sun level in places with no zone or zone without specified value.

50.0

growthModifierSun

Growth modifier per unit of sun exposure.

0.01

deadHumidity

Humidity threshold where plants die and disappear.

-17.0

wateringCanStartDurability

Durability of new watering cans.

20.0

updateInterval

IN SECONDS.

Update interval for plant updates. 1.5 minutes is optimal. 1 minute will work too, but everything less then that will cause performance issues. Higher value will provide players with less realistic updates of growth.

90

pricesUpdateCooldown

Cooldown (in minutes) for crop price updates.

60


Fertilizer Settings

Key
Description
Default

plantsPerFertilizerUse

Number of plants fertilized before requiring reapplication.

3

growthBoost

Extra growth rate when fertilized (e.g., 0.05 = 5%).

0.05

waterConsumptionReduction

Reduction in water consumption when fertilized (e.g., 0.05 = 5%).

0.05


Shops

Shops and buyers are configured inside config.lua. Each shop has its own set of fields that control how it behaves.


Common Fields

Field
Type
Default
Description

enable

boolean

true

Enables or disables the shop.

name

string

"Plants Bazaar"

Name shown in UI or on blip.

id

string

"farmingShop"

Unique identifier for the shop. Must not conflict with other shop IDs.

locations

Array<vec4>

{ vec4(2310.197, 4885.103, 40.808, 46.888) }

Positions where the shop NPC can spawn. Format: vec4(x, y, z, heading).

ped

string

"a_m_m_hillbilly_01"

Ped model used as shopkeeper.

groups

table or nil

nil

Restrict shop to specific groups. Use nil for all players or e.g. { crime = 0 }.

blip

table

see below

Controls blip settings.

inventory

table

see below

List of items the shop sells.


Blip Settings

Field
Type
Default
Description

enable

boolean

true

Whether the blip is visible on the map.

sprite

number

52

Sprite ID for the blip.

display

number

4

Display type (usually 4).

scale

number

0.8

Size of the blip.

colour

number

30

Color ID of the blip.

name

string

"Plants Bazaar"

Text shown on the map.


Inventory Items

Each shop’s inventory defines items for sale.

Field
Type
Default
Description

name

string

"watering_can"

Item name (must exist in item database/inventory system).

amount

number

50

Amount of the item in stock.

price

number

700

Price of the item.


Crop Buyers (cropsBuyer / illegalCropsBuyer)

Crop buyers use the same fields as shops, with an additional canBeSold table for prices.

Field
Type
Default
Description

canBeSold

table

{ onion = {10, 20}, salad = {10, 20}, pumpkin = 15 }

Defines items that can be sold. Value can be: - number: fixed price. - { x, y }: random price between x and y, updated every 2 hours.


Zones

The zones.lua file defines environmental regions that affect plant growth.

Example Zone

{
    coords = vec3(-342.457, -1124.154, 27.384),
    radius = 2000.0,
    name = 'los_santos',
    noPlants = true,
    humidity = math.random(10, 90),
    sun = 50
}

Parameters

Key
Description
Example

coords

Center of the zone

vec3(4819.077, -5163.221, -2.188)

radius

Zone radius in game units

1100.0

name

Name of the zone (or false for unnamed)

"cayo_perico"

humidity?

Optional override for zone humidity (0–100) Default: General Settings Random will set new value every time server starts

60.0 or

math.random(10, 90)

sun?

Optional override for sun exposure (0–100) Default: General Settings Random will set new value every time server starts

80.0 or

math.random(10, 90)

noPlants?

If true, planting is disabled in this area

true


Plants

The plants.lua file defines what crops can be grown, how long they take to grow, and their growth stages.

Example Plant (Weed)

weed_seed_weed = {
    specialArea = false,
    growthTime = 6,
    waterPerMinute = 4,
    yield = {
        { item = 'weedplant_weed', amount = 1 },
        { item = 'weed_seed_weed', amount = { 0, 2 } }
    },
    stages = {
        [1] = { growth = 0 },
        [2] = { growth = 10, model = `orchid_weed_green_small` },
        [3] = { growth = 20, model = `orchid_weed_green_mediumsmall` },
        [4] = { growth = 30, model = `orchid_weed_green_medium` },
        [5] = { growth = 50, model = `orchid_weed_green_bud` },
        [6] = { growth = 70, model = `orchid_weed_green_bud_bigger_b` },
        [7] = { growth = 90, model = `orchid_weed_green_bud_big` },
    },
}

Parameters

Key
Description
Example

specialArea

Whether the plant requires a specific zone to grow (name filed in Parameters)

false

growthTime

Growth time in hours

6

waterPerMinute

Water consumed per minute

4

yield

Items given when harvested

weedplant_weed, weed_seed_weed

stages

Growth stages and models used for each stage

See example. growth means percentage. As soon as plant growth reaches the value in stage the prop will be updated


Admin Commands

/toggleGrowingZones

  • Access: group.admin (edit functions/server.lua)

  • Description: Displays all configured growing zones from zones.lua.

Preview

/adminGrowing

  • Access: group.admin (edit functions/server.lua)

  • Description: Opens the admin growing menu, showing all placed pots and their data.

Preview

Last updated