Examples and troubleshooting
Restart the script after every change (restart kivo-weedshop). If you change the job in your framework (job name, grades), restart the framework or the server as well.
Configuration examples
Section titled “Configuration examples”Let employees work off duty
Section titled “Let employees work off duty”File shared/config/employee.lua:
requireOnDuty = false,Make harvesting and drying a supervisor job
Section titled “Make harvesting and drying a supervisor job”Raise the grade for the harvest and drying actions. Grade 2 is Supervisor in the default job.
permissions = { water = 0, fertilize = 0, plant = 0, harvest = 2, -- was 1 dry_start = 2, -- was 1 dry_collect = 2, -- was 1 transform = 1, sell = 1, restock = 2, hire = 2, fire = 3, promote = 3, demote = 3, manageSafe = 4},Give the business a bigger share
Section titled “Give the business a bigger share”Let the boss set between 30 and 60 percent for employees, and start at 50 percent:
employeePayConfig = { minPercent = 30, maxPercent = 60, defaultPercent = 50,},Halve all payouts
Section titled “Halve all payouts”mintAmounts = { water = 15.0, fertilize = 35.0, plant = 70.0, harvest = 140.0, dry_start = 100.0, dry_collect = 210.0, restock_complete = 350.0, transform = 90.0, sell_preroll = 12.5,},Pay a weekly salary in cash at 20:00
Section titled “Pay a weekly salary in cash at 20:00”salaryPeriod = "weekly",salaryPayTime = "20:00",salaryAccount = "cash",Remember that salaryAccount also decides where the per-action payouts go.
Change the rolling recipe
Section titled “Change the rolling recipe”File shared/registery.lua. Four dried plants make eight pre-rolls, with a shorter progress bar:
transformationArea = { label = 'Roll Pre-rolls', icon = 'fa-solid fa-joint', duration = 5000, requiredItem = 'dried_weed_plant', requiredCount = 4, outputItem = 'weed_preroll', outputCount = 8, -- keep thickness, debug and points as they are},Rolling still pays mintAmounts.transform once per batch. Selling pays per pre-roll, so eight pre-rolls per batch pay more than six. Update the text in shared/locales/en.lua too:
configActions = { -- ... transform = "Roll Pre-rolls (x4)", -- ...},Use a different job name
Section titled “Use a different job name”- Create the new job in your framework with grades 0 to 4 (use the installation definitions with the new name).
- In
shared/config/employee.lua:
jobName = "dispensary",- Restart the framework and the script. Players keep their activity history, but only players with the new job count as staff.
Use the lighter plant boards
Section titled “Use the lighter plant boards”Config.PlantDui = { enabled = true, renderer = 'native', renderDistance = 6.0, heightOffset = 1.15, size = 0.55,
native = { panelWidth = 0.112, panelHeight = 0.108, textScale = 1.0, },}Set enabled = false to remove the boards completely.
Add a third computer
Section titled “Add a third computer”Add one more entry to Config.ComputerZones in shared/config/ui.lua. Replace the numbers with your own position.
Config.ComputerZones = { { coords = vec4(114.9880, -1683.4984, 29.3093, 358.5895), radius = 1.5 }, { coords = vec4(109.8606, -1691.1304, 30.8755, 318.7355), radius = 1.5 }, { coords = vec4(100.0, -1680.0, 30.0, 0.0), radius = 1.5 }, -- your new position}Longer missions with a cooldown
Section titled “Longer missions with a cooldown”missionDuration = 40 * 60 * 1000, -- 40 minutescooldown = 60 * 60 * 1000, -- one hour between completed missions, whole shopstockIncreasePerMission = 20.0,Translate the computer
Section titled “Translate the computer”Edit only the values in shared/locales/en.lua. The keys stay in English.
tabs = { overview = "Resumen", activity = "Actividad", leaderboard = "Clasificacion", operations = "Operaciones", team = "Equipo", financials = "Finanzas", config = "Configuracion",},Framework and inventory notes
Section titled “Framework and inventory notes”| Setup | Notes |
|---|---|
| ESX | Add the job with the SQL from the installation page and restart es_extended. ESX has no duty state, so players count as on duty unless your job carries an onDuty value. The 'cash' account is mapped to ESX money automatically. The script needs the ESX shared object export, so use a current ESX Legacy. |
| QB-Core | Add the job to qb-core/shared/jobs.lua. The job starts players on duty (defaultDuty = true). A player who is off duty gets no options while requireOnDuty is true, so use your framework’s duty toggle or set requireOnDuty = false. |
| QBX | The script reaches QBX through the QB-Core compatibility bridge, so qb-core must resolve on your server. Add the job to qbx_core/shared/jobs.lua with numeric grade keys. Use ox_inventory items. |
ox_inventory |
Used first when it is running, on every framework. Add the five items to ox_inventory/data/items.lua. |
qb-inventory |
Only used on QB-Core and QBX, and only if ox_inventory is not running. The resource must be named qb-inventory. If your fork has another folder name, see Use another inventory. |
| ESX default inventory | Used on ESX when ox_inventory is not running. Add the items with the SQL on the installation page. |
| Both ESX and QB-Core running | ESX is picked. |
Things to know
Section titled “Things to know”Money is created, not moved
Section titled “Money is created, not moved”Every payout in mintAmounts is created by the script. The employee share goes to the player and the rest goes to the business safe. Neither is taken from an existing balance. One plot from planting to selling creates 1370 at the defaults (see the tip on the configuration page), plus the smaller amounts for every watering and fertilizing. Scale the values before you open the job to players.
Salary and framework pay both exist
Section titled “Salary and framework pay both exist”The script salary and the pay in the framework job are separate. A QB-Core payment or an ESX salary in the job definition is paid by the framework on top of the script salary. Set one side to 0 if you do not want both.
Selling takes everything
Section titled “Selling takes everything”The selling area sells every pre-roll the player carries in one go. There is no quantity prompt.
Inventory space
Section titled “Inventory space”Harvesting needs room for 6 wet plants, collecting a rack needs room for 6 dried plants, and rolling gives 6 pre-rolls by default. At the shipped weights that is 600, 480 and 180. If the items do not fit, the action is refused. Check your inventory weight limits.
Plot and rack ids are keys
Section titled “Plot and rack ids are keys”Plant and rack data is stored under the id of each plot and rack. If you rename an id on a running server, the renamed plot or rack starts as a new, empty one. Plant and rack data is also published under those ids as state bags (see Exports and integration).
Plot names on the floating boards
Section titled “Plot names on the floating boards”The floating board shows the plot label without the leading “Tend to “. A label such as Tend to Plot 1 shows as Plot 1. A label without that prefix is shown unchanged.
Firing and hiring
Section titled “Firing and hiring”Firing an employee sets their job to unemployed. Your framework needs a job with that name (every standard setup has one). Hiring sets the job skyhigh (or your jobName), so the job must exist in the framework, or hiring fails.
The shop interior
Section titled “The shop interior”If the interior map is missing or not started, the zones sit in empty space and the props in the interior (plants, racks, stock) do not change. The script preloads the interior when a player gets close. If you use a different interior, you must re-measure all coordinates and use the entity set names of that interior.
Restock warning text
Section titled “Restock warning text”The expiry warning always says 5 minutes. Keep gracePeriod at 5 minutes unless you accept the mismatch.
Leaderboard label
Section titled “Leaderboard label”The tag on the Leaderboard tab always says “Last 7 days”, even if you change leaderboardPeriod.
Text outside the computer
Section titled “Text outside the computer”shared/locales/en.lua only covers the computer. Prompts, target options, progress bars and notifications in the world are fixed English text. You can change the label and icon fields in shared/registery.lua.
Troubleshooting
Section titled “Troubleshooting”| Problem | Likely cause | What to do |
|---|---|---|
Console shows No framework detected (ESX or QBCore required) |
es_extended or qb-core was not running within 10 seconds |
Start the framework before the script. For QBX, enable the QB-Core compatibility bridge. |
Console shows No supported inventory detected |
No supported inventory is running | Start ox_inventory, qb-inventory (on QB-Core or QBX) or the ESX default inventory before the script. |
Console shows No target system detected (ox_target or qb-target required) |
No target resource is running | Start ox_target or qb-target before the script. |
| No options at the plots, racks or computer | The player does not have the job, is below the needed grade, or is off duty | Check the job name, the grade against permissions, and requireOnDuty. |
| Hiring fails | The skyhigh job or its grades are missing in the framework |
Add the job as shown on the installation page and restart the framework. |
| Firing fails | The framework has no unemployed job |
Add a job named unemployed with grade 0. |
| Items show without a picture | Item images are not in your inventory’s image folder | Add the five PNG files from the installation page. |
| Planting does nothing | The player has fewer than 6 weed_seed, or the items are not defined |
Give 6 or more seeds and check the item definitions. |
| Harvest option is missing | The plant is not fully grown, or the player lacks weed_shears or the grade |
Check the plant with Inspect Plant and the harvest permission. |
| Plants and racks look the same in the shop | The interior is not started, or the entity set names do not match the interior | Start the interior map and check entitySet and entitySets names. |
| Floating boards are missing | Config.PlantDui.enabled is false, or the player is further than renderDistance from the pot |
Enable the boards and check the distance. |
| Employees are not paid | salaryAccount is not an account your framework knows |
Use 'bank' or 'cash' for salaryAccount. |
| Salary seems paid twice | Framework job pay and script salary both apply | Set the pay of one of them to 0. |
| Discord avatar does not show | No bot token, no Discord identifier on the player, or no outbound access to discord.com |
See Discord avatars. |
| Config change has no effect | The script was not restarted | Run restart kivo-weedshop. Restart the framework after job changes. |
| Duplicate grades after the ESX import | The job SQL was run more than once | Remove the duplicate skyhigh rows from job_grades and keep one set. |
Checklist before you go live
Section titled “Checklist before you go live”- The shop interior is installed and starts before the script.
skyhigh(or your job name) exists in the framework with grades 0 to 4, andunemployedexists.- All five items exist with images.
- You gave a boss the job and tested every step: grab a tool, plant, water, fertilize, harvest, dry, roll, sell, restock.
mintAmountsandemployeePayConfigfit your economy.- You decided between framework pay and script salary.
Config.UIisfalse.- Seeds and shears are available through a shop or another source.
