GFX Development
  • gfx
    • About GFX
  • Product Docs
    • 📥GFX All in One Menu
      • 🛠️Setup
        • ⚙️Configuration
        • 📝Setting Permissions
      • 📒Informations
        • 💻For Developers
        • 👨‍💻Admin Commands
      • 🖇️Pages
        • 📄Profile
        • 📄Leaderboard
    • 🏎️GFX Racing
      • 🔨Installation
      • ⚙️Configuration
    • 📸GFX Deathcam
      • 🔨Installation
      • GFX Deathcam V1
        • ⚙️Configuration
      • GFX Deathcam V2
        • ⚙️Configuration
    • 📊GFX Leaderboard
      • 🔨Installation
      • ⚙️Configuration
    • ⚔️GFX Arena
      • 🔨Installation
      • ⚙️Configuration
    • 👨‍👨‍👦‍👦GFX Squad
      • 🔨Installation
      • ⚙️Configuration
      • 💻Exports
    • 🔬GFX Evidence
      • 🔨Installation
      • ⚙️Configuration
    • ❗GFX Notification
      • 🔨Installation
      • ⚙️Configuration
      • 💻Exports and Events
        • ⬆️Exports
        • ⬇️Events
    • 🚚GFX Delivery
      • 🔨Installation
      • ⚙️Configuration
    • 🛍️GFX Tebexshop
      • 🔨Installation
      • ⚙️Configuration
      • ⚠️Tebex Settings
      • ⬆️Exports
    • 👁️‍🗨️GFX Interact
      • 🔨Installation
      • ⬆️Exports
    • 🫂GFX Crew
      • 🔨Installation
      • ⚙️Configuration
      • ⬆️Exports
    • 🫂GFX Squad Remake
      • 🔨Installation
      • ⚙️Configuration
      • ⬆️Exports
    • GFX PVP Chat
      • 🔨Installation
      • ⚙️Configuration
      • ⬆️Exports
    • GFX HUD
      • 🔨Installation
      • ⚙️Configuration
    • 🔫GFX Attachment
      • 🔨Installation
      • ⚙️Configuration
    • 💀GFX Deathlog
      • 🔨Installation
      • ⚙️Configuration
    • 🛍️GFX PVP Shop
      • 🔨Installation
      • ⚙️Configuration
    • 🧱GFX Crafting
      • 🔨Installation
      • ⚙️Configuration
    • 🚍GFX Bus Job
      • 🔨Installation
      • ⚙️Configuration
    • 🐔GFX Chicken Farm
      • 🔨Installation
      • ⚙️Configuration
    • 🎁GFX Giveaway
      • 🔨Installation
      • ⚙️Configuration
    • 🛍️GFX Pawnshop
      • 🔨Installation
      • ⚙️Configuration
    • 🪵GFX Lumberjack
      • 🔨Installation
      • ⚙️Configuration
    • 🚙GFX Secondhand Vehicle
      • 🔨Installation
      • ⚙️Configuration
    • 🤖GFX Autopilot
      • 🔨Installation
      • ⚙️Configuration
    • 🗳️GFX Vote
      • 🔨Installation
      • ⚙️Configuration
    • 🟢GFX Safezone
      • 🔨Installation
      • ⚙️Configuration
    • 🎅GFX Christmastruck
      • 🔨Installation
      • ⚙️Configuration
    • 🚔GFX Handcuff
      • 🔨Installation
      • ⚙️Configuration
    • 🚚GFX Trucker Job
      • 🔨Installation
      • ⚙️Configuration
    • 🌱GFX Weed
      • 🔨Installation
      • ⚙️Configuration
    • 🔉GFX DUI Radio
      • 🔨Installation
      • ⚙️Configuration
Powered by GitBook
On this page
  1. Product Docs
  2. GFX Chicken Farm

Configuration

Check the instructions below.

The primary configuration file is Config.lua. Localizations and additional settings can be adjusted in locales/en.lua.


General Settings

Setting
Description
Default Value

MySQL

MySQL library to use (oxmysql, mysql-async, ghmattimysql, or false).

"oxmysql"

Framework

Framework used (qb, esx).

"qb"

Locale

Language for the script.

"en"

FarmSellTax

Tax percentage applied when selling produce.

25

FarmNameFormat

Format for farm names (e.g., {defaultname}, {firstname}).

"{defaultname}"

JobRequirement

Require a specific job to manage farms.

false

JobName

Job name required to access the farm (if enabled).

"farmer"


Chicken and Egg Settings

Setting
Description
Default Value

EggItem

Item name for eggs.

"egg"

EggCrackPeriod

Time (minutes) for eggs to crack.

1

EggOvulationPeriod

Time (minutes) for chickens to lay eggs.

1

ChickenFeedItem

Item name for chicken feed.

"chicken-feed"

ChickenSellPrice

Price for selling a chicken.

1000

CollectingExp

Experience gained for collecting eggs or managing chickens.

20

ChickenHungerTime

Interval (minutes) for chicken hunger to decrease.

5


Farm Settings

Setting
Description
Default Value

Farms

List of farms available for purchase.

(See example below)

SellerNpc

NPC model for selling farm products.

"a_m_m_farmer_01"

SellerNpcCoords

Coordinates for the seller NPC.

vector3(1912.91, 4931.70, 48.86)

VehicleSpawnCoords

Coordinates for spawning delivery vehicles.

vector4(1791.09, 5029.83, 56.91, 306.08)

VehicleDestination

Coordinates for the delivery destination.

vector3(1905.64, 4948.85, 50.89)

Example Farm Configuration

Farms = {
    {
        DefaultName = "Grapeseed Chicken Farm",
        Photo = "https://twiftnews.com/wp-content/uploads/2020/10/weed-farm-san-chianski-mountain-range.jpg",
        Price = 200000,
        Coords = vector3(2306.42, 4885.97, 41.81),
        Camera = vector4(2182.96, 4910.913, 100.3326, 262.4503),
        ChickenPoints = {
            vector4(2258.07, 4899.96, 40.81, 225.26),
            vector4(2259.86, 4901.6, 40.81, 203.59)
        }
    }
}

Notifications

Custom notifications for client and server events.

Function
Description

ClientNotify

Displays a notification to the client.

ServerNotify

Displays a notification to a specific player.

Example Notification Usage

ClientNotify = function(title, msg, type)
    TriggerEvent('QBCore:Notify', msg, type, 2500)
end

Localization

The script supports multiple languages through localization files like locales/en.lua.

Example Localization Keys

Locales["en"] = {
    ["FarmPurchased"] = "You bought %s",
    ["FarmSelled"] = "You sold your farm for $%s",
    ["ChickenDied"] = "Your chicken just starved to death",
    ["EggReady"] = "Chick ready to hatch"
}

Data Storage

All data is recorded in JSON files located in the data/ directory. No SQL setup is required unless MySQL is explicitly enabled.

File
Description

chicken_animals.json

Records chicken data.

chicken_eggs.json

Records egg data.

chicken_farms.json

Records farm data.


PreviousInstallationNextGFX Giveaway

Last updated 5 months ago

🐔
⚙️