4-stage growth system, dynamic weather effects, quality-based harvest yield, real-time triple sync, and full ox_core integration. Built on ox_core ยท ox_lib ยท ox_inventory ยท ox_target ยท oxmysql
Built by Red Dragon Elite | SerpentsByte
- Overview
- Features
- How It Works
- Dependencies
- Installation
- Item Setup
- Configuration
- Admin Commands
- Database
- Performance
- Troubleshooting
- Changelog
- License
RDE Wild Plants is a production-ready plant growing system for FiveM servers running ox_core. Plants grow through four realistic stages, react dynamically to weather, produce quality-based harvest yields, and sync perfectly across all clients via a triple sync architecture โ all persistent across server restarts.
| Feature | Generic Growing Scripts | RDE Wild Plants |
|---|---|---|
| Multi-stage growth | Sometimes 2 | โ 4 stages |
| Weather effects | โ | โ Rain, thunder, sun, fog |
| Quality system | โ | โ Affects harvest yield |
| Real-time sync | Polling | โ Triple sync architecture |
| 3D text display | โ | โ Stage + time remaining |
| Random events | โ | โ 5% failure chance |
| Database persistent | Sometimes | โ Always โ auto table |
| Triple admin verification | โ | โ ACE + ox_core + Steam |
- 4-stage progression: Seedling โ Young Plant โ Flowering โ Ready to Harvest
- ~45 minutes total growth time (fully configurable per stage)
- 3D text above each plant showing current stage and time remaining
- 5% random failure chance for added realism
- Plants persist across server restarts via MySQL
- Rain โ 20% faster growth
- Extra Sunny โ 15% faster growth
- Thunderstorm โ 20% slower growth
- Foggy โ 15% slower growth
- Weather is checked live and affects all active plants in real time
- Each planted seed generates a random quality value (80โ100%)
- Quality directly scales the harvest yield
- Weather bonus at harvest time applies an additional multiplier
- 30% chance for a bonus seed on successful harvest
- Triple sync system โ statebags + server events + client callbacks
- New players receive full plant state on join
- All updates broadcast instantly to all connected clients
- Triple verification: ACE permissions + ox_core groups + Steam ID whitelist
- Admin-only commands for plant management and debugging
- Planting โ Player uses a
weed_seeditem near valid ground. ox_target interaction starts the process. - Growth โ Plant advances through 4 stages over ~45 minutes. Weather speeds up or slows down progression.
- Harvesting โ When stage 4 is reached, player uses
harvest_toolvia ox_target to harvest. - Rewards โ Player receives 25โ75
harvested_weeditems, scaled by quality and weather bonus. 30% chance for a bonus seed.
| Resource | Required | Notes |
|---|---|---|
| oxmysql | โ Required | Database layer |
| ox_core | โ Required | Player/character framework |
| ox_lib | โ Required | UI, callbacks, notifications |
| ox_inventory | โ Required | Seed and harvest items |
| ox_target | โ Required | Plant interaction |
cd resources
git clone https://github.com/RedDragonElite/rde_wildplant.gitensure oxmysql
ensure ox_core
ensure ox_lib
ensure ox_inventory
ensure ox_target
ensure rde_wildplantsOrder matters.
rde_wildplantsmust start after all its dependencies.
The rde_plants table is created automatically on first start. No manual SQL import needed.
restart rde_wildplants
Add the following to ox_inventory/data/items.lua:
['weed_seed'] = {
label = 'Weed Seed',
weight = 10,
stack = true,
close = true,
description = 'A seed for growing plants',
},
['harvest_tool'] = {
label = 'Harvest Tool',
weight = 500,
stack = false,
close = true,
description = 'Tool for harvesting plants',
},
['harvested_weed'] = {
label = 'Harvested Weed',
weight = 50,
stack = true,
close = true,
description = 'Freshly harvested plant material',
},All values are configurable in config.lua. Key settings:
Config.GrowthStages = {
[1] = 15 * 60, -- Seedling โ 15 min
[2] = 15 * 60, -- Young Plant โ 15 min
[3] = 15 * 60, -- Flowering โ 15 min
[4] = 0, -- Ready โ harvest immediately
}Config.WeatherMultipliers = {
RAIN = 1.20, -- 20% faster
EXTRASUNNY = 1.15, -- 15% faster
THUNDER = 0.80, -- 20% slower
FOGGY = 0.85, -- 15% slower
}Config.Harvest = {
baseMin = 25, -- minimum items
baseMax = 75, -- maximum items
bonusSeedChance = 0.30, -- 30% chance for bonus seed
failureChance = 0.05, -- 5% plant failure chance
}Config.AdminSystem = {
checkOrder = {'ace', 'oxcore', 'steam'},
acePermission = 'rde.plants.admin',
oxGroups = { admin = 0, superadmin = 0 },
steamIds = { 'steam:110000xxxxxxxx' },
}add_ace group.admin rde.plants.admin allow
add_principal identifier.steam:110000xxxxxxxx group.admin| Command | Description |
|---|---|
/deleteplants |
Delete all active plants from world and database |
/countplants |
Show total active plant count |
/debugplants |
Client-side debug info for nearby plants |
/debugplantsserver |
Server-side plant state dump to console |
Table is auto-created on first start:
CREATE TABLE rde_plants (
id VARCHAR(64) PRIMARY KEY,
model VARCHAR(64) NOT NULL,
coords JSON NOT NULL,
stage INT DEFAULT 1,
quality FLOAT DEFAULT 1.0,
planted_by VARCHAR(64) NOT NULL,
planted_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
INDEX idx_planted_by (planted_by)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;- ~800 lines total โ lightweight by design
- Efficient rendering via LOD-aware 3D text (only drawn within range)
- Database operations are async โ no blocking calls
- Weather checks are cached, not polled every tick
- Plant sync fires only on state change, not on a loop
Plants not showing after restart?
Check that oxmysql is fully started before rde_wildplants. Fix ensure order in server.cfg if needed. Run /countplants to confirm DB entries exist.
Harvest tool not triggering ox_target option?
Make sure ox_target is started before rde_wildplants. Check F8 console for export errors on resource start.
Weather effects not applying?
Enable Config.Debug = true and check server console. Confirm the weather type string returned by your server matches the keys in Config.WeatherMultipliers.
Plants stuck at stage 1?
Check server console for timer errors. Verify oxmysql is connected and the rde_plants table exists (SHOW TABLES LIKE 'rde_plants').
Admin commands not working?
Verify your ACE setup in server.cfg and that your Steam ID in Config.AdminSystem.steamIds matches the exact hex format (steam:110000xxxxxxxxx).
- 4-stage plant growth system
- Dynamic weather integration (rain, thunder, sun, fog)
- Quality-based harvest yield
- Triple sync system for perfect multiplayer support
- Triple admin verification (ACE + ox_core + Steam)
- 3D text display per plant
- Random failure events
- Multi-language support (EN/DE)
- Auto database table creation
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature - Commit:
git commit -m 'Add your feature' - Push:
git push origin feature/your-feature - Open a Pull Request
Guidelines: follow existing Lua conventions, comment complex logic, test on a live server before PR, update docs if adding features.
###################################################################################
# #
# .:: RED DRAGON ELITE (RDE) - BLACK FLAG SOURCE LICENSE v6.66 ::. #
# #
# PROJECT: RDE_WILDPLANTS v1.0.0 (ADVANCED PLANT GROWING SYSTEM FOR FIVEM) #
# ARCHITECT: .:: RDE โง Shin [โณ แแ
แฑแแ
แพแแ แแแแ
โฝ] ::. | https://rd-elite.com #
# ORIGIN: https://github.com/RedDragonElite #
# #
# WARNING: THIS CODE IS PROTECTED BY DIGITAL VOODOO AND PURE HATRED FOR LEAKERS #
# #
# [ THE RULES OF THE GAME ] #
# #
# 1. // THE "FUCK GREED" PROTOCOL (FREE USE) #
# You are free to use, edit, and abuse this code on your server. #
# Learn from it. Break it. Fix it. That is the hacker way. #
# Cost: 0.00โฌ. If you paid for this, you got scammed by a rat. #
# #
# 2. // THE TEBEX KILL SWITCH (COMMERCIAL SUICIDE) #
# Listen closely, you parasites: #
# If I find this script on Tebex, Patreon, or in a paid "Premium Pack": #
# > I will DMCA your store into oblivion. #
# > I will publicly shame your community. #
# > I hope your server lag spikes to 9999ms every time you blink. #
# SELLING FREE WORK IS THEFT. AND I AM THE JUDGE. #
# #
# 3. // THE CREDIT OATH #
# Keep this header. If you remove my name, you admit you have no skill. #
# You can add "Edited by [YourName]", but never erase the original creator. #
# Don't be a skid. Respect the architecture. #
# #
# 4. // THE CURSE OF THE COPY-PASTE #
# This code uses async timers, weather hooks, and a triple sync layer. #
# If you just copy-paste without reading, it WILL break. #
# Don't come crying to my DMs. RTFM or learn to code. #
# #
# -------------------------------------------------------------------------- #
# "We build the future on the graves of paid resources." #
# "REJECT MODERN MEDIOCRITY. EMBRACE RDE SUPERIORITY." #
# -------------------------------------------------------------------------- #
###################################################################################
TL;DR:
- โ Free forever โ use it, edit it, learn from it
- โ Keep the header โ credit where it's due
- โ Don't sell it โ commercial use = instant DMCA
- โ Don't be a skid โ copy-paste without reading won't work anyway
| ๐ GitHub | RedDragonElite |
| ๐ Website | rd-elite.com |
| ๐ต Nostr (RDE) | RedDragonElite |
| ๐ต Nostr (Shin) | SerpentsByte |
| ๐ช RDE Doors | rde_doors |
| ๐ RDE Car Service | rde_carservice |
| ๐ฏ RDE Skills | rde_skills |
| ๐ฎ RDE Props | rde_props |
| ๐ก RDE Nostr Log | rde_nostr_log |
When asking for help, always include:
- Full error from server console or txAdmin
- Your
server.cfgresource start order - ox_core / ox_lib versions in use
"We build the future on the graves of paid resources."
REJECT MODERN MEDIOCRITY. EMBRACE RDE SUPERIORITY.
๐ Made with ๐ฅ by Red Dragon Elite
