F.A.Q

3 min readUpdated Today

Setup

Set Config.Language in shared/config.lua:

shared/config.lua
1Config.Language = 'en'
  1. Verify the prop model exists in GTA (check the model name in the admin panel)
  2. Check Config.StreamRadius - you may be too far away
  3. Ensure no ground material restriction is blocking placement (Config.OnlyAllowedGrounds)

Check that oxmysql is running and the database connection is working. Tables are created automatically on first start.

Mechanics

Plants grow over time based on Config.GlobalGrowTime (each plant type can override it). Water drains at Config.WaterDecay per minute: below Config.WaterThreshold the plant starts losing health, and at 0 water growth stops entirely. Keeping fertilizer above 50 speeds up growth by up to 50%.

Plants inside a growth zone use the zone's growMultiplier (2.0 = twice as fast) and yieldMultiplier (boosts harvested counts). Zones can also restrict which seeds are allowed and cap the total plants inside. Manage them in shared/zones.lua or from the admin panel zone editor.

Yes. Set Config.OnlyAllowedGrounds = true and list the allowed ground material hashes in Config.AllowedGrounds. The available materials and their hashes are listed in Config.GroundMaterials.

Config.PlayerPlantLimit sets a global cap. Use Config.PlantLimitOverrides to set different limits for specific plant types.

Every plant gets a target interaction sphere. As a fallback, the /plantmenu command opens the interaction menu for the nearest plant within 3 meters.

Yes, and each action is separate. Open the plant type in the admin panel, go to Skill Integration and pick the tab you want: Plant, Water, Fertilize or Harvest. Set a required skill, a minimum level, or both. An action left empty requires nothing. Set it once on the category and every plant in it inherits the same rules.

In the same section, per action. Pick the skill that receives the XP, or just a category, then set the amount. Harvest XP is scaled by the plant health and the zone yield multiplier; planting, watering and fertilizing grant their flat amount. The global multiplier and the per-harvest ceiling live in the config:

shared/config.lua
1Config.ExternalSkills = {
2    Enabled = true,
3    Resource = 'ml_skills',
4    XpMultiplier = 1.0,
5    MaxXpPerHarvest = 500,
6}

Every requirement passes and no XP is granted. The same applies while the resource is restarting or when a player has not been loaded into it yet, so nobody is ever locked out of a crop by a progression system that is down. Set Config.ExternalSkills.Enabled = false to switch the whole system off on purpose.

Admin

Use the admin panel (/plantadmin). Plant types, categories, seed items, and growth configs are all managed through the UI and stored in the database.

Players with admin permission on your framework. ml_bridge resolves the check (the admin/god group on QBCore, Qbox and ESX, or ACE admin on standalone).

Updates

  1. Download latest from CFX Portal
  2. Backup shared/config.lua, shared/zones.lua, server/config_server.lua, the open/ folder and the two handlers.lua files if you edited them
  3. Replace all files except config
  4. Restart the resource

Plant data, plant types, categories and zones are stored in the database - they survive updates.