๐Beekeeping Script
1) Overview
Risk Beekeeping is a fully featured beekeeping job script for FiveM servers featuring:
๐ Placeable beehives with real collection timers
๐บ๏ธ Forest scan zones โ players must find the right location
๐ฏ Full honey processing chain (harvest โ clean โ mix โ sell)
๐งฅ Beekeeper suit system with sting damage
๐ช Built-in shop, seller NPC and processing stations
๐๏ธ Auto-delete system for inactive hives with player notifications
๐ Fully exploit-safe โ all logic runs server-side
๐ฆ Supports ESX, QBCore and QBox (auto-detected)
๐๏ธ SQL-based data storage via oxmysql
2) File Structure
You have access to these configuration files:
risk-beekeeping/
โโโ beekeeping.sql โ Run this once in your database
โโโ config/
โโโ config_general.lua โ Max hives, forest zones, scanner item
โโโ config_collector.lua โ Hive placement, bee timer, auto-delete
โโโ config_market.lua โ Shop location, items, prices, NPC
โโโ config_seller.lua โ Seller NPC, sellable items, prices
โโโ config_cleaner.lua โ Honey cleaner location and rewards
โโโ config_mixer.lua โ Honey mixer location and rewards
โโโ config_clothing.lua โ Beekeeper suit, sting damage
โโโ config_zones.lua โ Forest scan zones
โโโ config_notifications.lua โ All notification texts3) Database Setup
Run the file beekeeping.sql once in your database before starting the script.
Step 1: Run the SQL file
Open HeidiSQL, phpMyAdmin or any SQL tool
Select your FiveM database
Open
beekeeping.sqlfrom the script folderExecute the file
This creates two tables:
beekeeping_hives
Stores all placed hives with position, owner, and timer
beekeeping_pending_notify
Stores deletion notifications for offline players
โ ๏ธ IMPORTANT: If you update the script and the table already exists, run only the
ALTER TABLEline shown in the SQL file โ do not run the full file again.
4) Items Setup
For ESX / QBCore / QBox
Inside the [items]/ folder you will find:
items.luaโ item definitions to add to your framework[items]/sql/โ ready-to-use SQL files (de, en, es, fr, ru, zh)
Run the SQL file for your language or manually add the items using items.lua.
Required Items
hive
Beehive โ used to place in the world
bees
Bees โ placed into the hive to start collecting
beehiveframe
Frame โ consumed when placing (5x required by default)
forestscanner
Scanner โ reveals allowed placement zones on the map
beekeeper_suit
Protective suit โ protects against bee stings
dirtyhoney
Raw honeycomb โ reward when harvesting
cleanhoney
Clean honey โ output of the Cleaner station
emptyhoneyjar
Empty jar โ required for the Mixer
honeyjar
Honey jar โ finished product ready to sell
scraper
Hive tool โ required to use the Cleaner
5) server.cfg Setup
Add the following to your server.cfg:
โ ๏ธ IMPORTANT:
oxmysqlandox_libmust start beforerisk-beekeeping.
The framework (ESX, QBCore or QBox) is detected automatically at runtime โ nothing needs to be set manually.
6) Configuration
config_general.lua โ General Settings
Debug
Enable debug prints in the server console. Always false in production.
IdentifierType
Player identifier used for ownership. "license" or "steam".
MaxHivesPerPlayer
Maximum number of active hives per player at the same time.
ForestScannerItem
Item name of the forest scanner. Only change if you renamed the item.
config_zones.lua โ Forest Scan Zones
Zones define where players are allowed to place beehives. Players must be inside a zone to place a hive.
Parameters:
name
Zone name displayed to the player
center
Center coordinates of the zone
radius
Zone radius in meters
color
Blip color when the zone is revealed by the scanner
alpha
Blip transparency (0โ255)
maxHives
Maximum number of hives allowed in this zone at the same time
How to find coordinates:
Use
/coordsin-game (if your server has this command)Or use the F8 console and type
getposin supported scripts
Add a new zone:
Disable zone limit (unlimited hives per zone):
config_collector.lua โ Beehive & Timing โญ
This is the most important config file. Start here.
BeesWaitTime
How long bees collect honey, in seconds. Example: 3600 = 1 hour
DeleteAfterDays
Days until inactive hives are auto-deleted. Set 0 to disable
RewardItem
Item the player receives when harvesting the hive
RewardQuantity
How many of the reward item the player receives
RequiredFramesItem
Item consumed when placing the hive
RequiredFramesCount
How many frames are needed to place a hive
BeeItem
Item used to place bees into the hive
Timer examples:
Hive blip settings:
Optional placement items (e.g. require a hammer and wood to place):
๐ก TIP: Set
enabled = falseto skip this requirement completely.
config_market.lua โ Shop
The market is where players buy all beekeeping supplies.
Location
Coordinates of the shop marker
ShowDistance
Distance from which the marker becomes visible
MarkerRadius
Distance at which the player can interact
OpenKey
Key to open the shop (default: 38 = E)
NPC.enable
Show an NPC at the shop location
NPC.model
NPC model name
NPC.coords
NPC position and heading (vector4)
Blip.enable
Show a map blip for the shop
Shop items โ add, remove or change prices:
name
Display name shown in the shop UI
item
Internal item name (must match your items)
price
Price shown in the UI (use "$30" format)
amount
How many items the player receives per purchase
description
Short description shown in the shop
image
Image filename from the html/images/ folder
config_seller.lua โ Seller NPC
The seller is where players sell processed honey products.
Location
Coordinates of the seller marker
SellAmount
How many items are sold per click
ItemsToSell
List of sellable items with labels and prices
PaymentMethods
Payment options shown to the player (Cash / Bank)
NPC.enable
Show an NPC at the seller location
Change sell prices:
Change items sold per click:
config_cleaner.lua โ Honey Cleaner
The cleaner converts raw honeycomb into clean honey.
Location
Coordinates of the cleaner station
RequiredHoneyItem
Input item (raw honeycomb)
RequiredHoneyCount
How many input items are consumed per cycle
RequiredToolItem
Tool required to use the cleaner (not consumed)
RewardItem
Output item (clean honey)
RewardQuantity
How many output items are produced
Processing ratio example (10 dirty โ 5 clean):
config_mixer.lua โ Honey Mixer
The mixer combines clean honey and an empty jar into a sellable honey jar.
Location
Coordinates of the mixer station
RequiredHoneyItem
Input item (clean honey)
RequiredHoneyCount
How many input items are consumed per mix
RequiredEmptyJarItem
Empty jar consumed per mix
RewardItem
Output item (honey jar)
RewardCount
How many output items are produced
config_clothing.lua โ Beekeeper Suit
Controls the protective suit system and bee sting mechanics.
ClothingEnabled
Enable or disable the entire suit system
SingleSuitItem
Item name of the beekeeper suit
MatchTextures
true = suit texture must also match; false = only check the drawable
HiveDangerDistance
Distance in meters at which bees start stinging
DamageInterval
Time between stings in milliseconds (8000 = every 8 seconds)
DamageAmount
Health removed per sting
MinimumHealth
Health will never go below this value
Disable sting damage completely:
Make bees more aggressive:
config_notifications.lua โ Notification Texts
All messages shown to players can be edited here.
๐ก TIP: Keep placeholders like
{minutes},{count},{days},{item},{max}in place โ they are automatically replaced with real values.
Important placeholders:
{minutes}
beesNotReady, placeBeesSuccess
Remaining minutes
{count}
collectorMissingFrames, zoneHiveCapReached
Item count / hive count
{max}
maxHiveReached, zoneHiveCapReached
Max allowed amount
{item}
missingPlaceItem, cleanerMissingHoney
Item name
{days}
hiveDeletedInactive
Days from DeleteAfterDays
Translate to German (example):
7) Player Gameplay Flow
This is the full process a player follows from start to finish:
8) Auto-Delete System
Hives that are left inactive are automatically deleted after the number of days set in DeleteAfterDays.
How the timer works:
Hive placed, no bees added
From the moment the hive was placed
Bees placed (even after 2 days)
Timer resets to the moment bees were placed
Hive ready but not harvested
From the moment the bees finished collecting
Disable auto-delete:
Player notifications:
Online โ Player is notified immediately when their hive is deleted
Offline โ Notification is saved and shown the next time the player logs in
If a player had multiple hives deleted, they receive one combined message:
๐ก TIP: Customize the message text in
config_notifications.luaโhiveDeletedInactive.
9) Troubleshooting
โ Hive cannot be placed
Possible causes:
Player is not inside a
ForestScanZoneZone has reached
maxHiveslimitPlayer already has
MaxHivesPerPlayeractive hivesPlayer is missing required items (frames, etc.)
Solution:
Check zone coordinates in
config_zones.luaIncrease
maxHivesorMaxHivesPerPlayerif neededVerify all required items are in the player's inventory
โ Hive timer shows wrong time
Possible causes:
This was a known bug caused by client/server time mismatch
Solution:
This bug is fixed in the current version
Restart the server after updating
โ Items not recognized
Possible causes:
Items not added to the database or
items.luaWrong item name in config
Solution:
Run the SQL file from
[items]/sql/for your languageMake sure item names in config match exactly (case-sensitive)
โ SQL error on server start
Possible causes:
beekeeping.sqlhas not been runoxmysqlstarts afterrisk-beekeeping
Solution:
Run
beekeeping.sqlin your databaseMake sure
ensure oxmysqlcomes beforeensure risk-beekeepinginserver.cfg
โ NPC not visible
Possible causes:
NPC is disabled in config
Wrong coordinates
Solution:
Check
NPC.enable = trueinconfig_market.lua/config_seller.luaVerify NPC coordinates are correct
โ Bees not stinging without suit
Possible causes:
ClothingEnabledis set tofalsePlayer is too far from the hive
Solution:
Set
ClothingEnabled = trueinconfig_clothing.luaCheck
HiveDangerDistanceโ increase if needed
โ Hives not being auto-deleted
Possible causes:
DeleteAfterDaysis set to0Hives do not meet the deletion conditions yet
Solution:
Set
DeleteAfterDaysto a value greater than0The check runs every hour and on server restart
10) Best Practices
โ
Set BeesWaitTime to match your server economy โ Too short = too easy, too long = players lose interest
โ
Configure all 4 locations โ Market, Seller, Cleaner and Mixer should all be at different spots
โ
Use the Forest Scanner โ Make sure at least 1-2 zones are within the map boundaries
โ
Set maxHives per zone โ Prevents one player from monopolizing a zone
โ
Enable DeleteAfterDays โ Keeps the database clean and prevents ghost hives
โ
Keep item names lowercase โ Item names are case-sensitive
โ
Test all stations โ Buy items, place hive, harvest, clean, mix, sell before going live
โ
Backup config files โ Save copies before making changes
11) Quick Start Checklist
[ ] Run
beekeeping.sqlin the database[ ] Add items via
[items]/sql/oritems.lua[ ] Add
ensure risk-beekeepingtoserver.cfg[ ] Set
MaxHivesPerPlayerinconfig_general.lua[ ] Set zone coordinates in
config_zones.lua[ ] Set
BeesWaitTimeinconfig_collector.lua[ ] Set
DeleteAfterDaysinconfig_collector.lua[ ] Set Market location in
config_market.lua[ ] Set Seller location and prices in
config_seller.lua[ ] Set Cleaner location in
config_cleaner.lua[ ] Set Mixer location in
config_mixer.lua[ ] Adjust sell prices in
config_seller.lua[ ] Start the server and test all stations in-game
Last updated