lation scripts
scriptsmembershipdocs
see the scripts
Skip to Content
lation ui
lation interact
lation banking
lation shops
lation jobs
lation weed
lation chop shop

classics

money laundering
drug sales
coke processing
Making cokeConfigurationDevelopersChangelog
meth crafting
metal detecting
scuba diving
coke processing

Configuration

Every coke processing option in config/shared.lua, config/client.lua, config/server.lua and config/icons.lua with its default, plus the text UI and language files.

coke processing is set in four files in config/. Each returns one table, and the options below are written as paths inside it (setup.notify, settings.limit). The files ship open, along with locales/, the bridge and the two functions.lua files. Restart the server after a change.

  • config/shared.lua: the field, plants, tables, cement, the shops, labs, raids, cooking and consumables.
  • config/client.lua: placement and camera controls, lifetime stats and every progress bar.
  • config/server.lua: logging.
  • config/icons.lua: icons and colors.

config/shared.lua

Setup

OptionDefaultWhat it does
setup.debugfalseDraws the zones, prints the soil hash under a plant being placed in F8, draws the table's collision rays, and adds /getrot and /getbucket. It costs resource time, so keep it off in production.
setup.interact'ox_target''ox_target', 'qb-target', 'interact' or 'custom'. Keep 'ox_target' with lation interact. 'custom' does nothing until you add your calls in client/functions.lua.
setup.notify'ox_lib''lation_ui', 'ox_lib', 'esx', 'qb', 'okok', 'sd-notify', 'wasabi_notify' or 'custom'
setup.progress'ox_lib''lation_ui', 'ox_lib', 'qbcore' or 'custom'. A custom progress bar has to play the animations.
setup.minigame'ox_lib'The raid skill checks: 'lation_ui', 'ox_lib' or 'custom'
setup.menu'ox_lib''lation_ui', 'ox_lib' or 'custom'
setup.dialogs'ox_lib'Confirmations and input dialogs: 'lation_ui', 'ox_lib' or 'custom'
setup.versiontruePrints a line in the server console when an update is out
setup.request10000Milliseconds to wait for a model or animation to load
setup.render100Meters within which plants, tables and the farmer appear
setup.police{ 'police', 'sheriff' }The police jobs. They count toward police requirements, can raid and confiscate, can destroy plants when planting.anyone_destroy is off, and get the alerts in dispatch scripts that take a job list. On Qbox and QBCore only players on duty count.

The coca field

OptionDefaultWhat it does
cooldown180Seconds a searched wild plant stays empty, for everyone
limit100Leaves each player can search until the script restarts

farms is a list of fields. The first one ships set up near Grapeseed:

config/shared.lua
farms = {
    [1] = {
        spawn = true,
        model = 'coca_growth_3_wild',
        center = vec3(2139.1252, 5169.0010, 54.1451),
        size = 150,
        level = 1,
        required = {
            { item = 'ls_shears', quantity = 1, remove = false },
        },
        reward = { item = 'ls_coca_leaf', quantity = { min = 1, max = 1 } },
        seed = { item = 'ls_coca_seed', quantity = { min = 1, max = 1 }, chance = 5 },
        xp = { min = 1, max = 1 },
        blip = { enable = true, sprite = 89, color = 1, scale = 0.7, label = 'Coca Field' },
        coca = {
            [1] = vec3(2179.3621, 5155.1704, 53.9840),
            -- 49 plants in all
        }
    },
},
FieldWhat it does
spawntrue spawns model at each point. false puts the prompt on whatever already stands there.
modelThe prop to spawn. coke processing streams coca_growth_1_wild, coca_growth_2_wild and coca_growth_3_wild.
centerThe middle of the field. Props appear when a player comes within size of it.
sizeThe field's radius in meters. A search more than 5 m outside it is refused.
levelThe level needed to search here
requiredItems a player must carry to search. They are never taken.
rewardThe item each search gives, and how many
seedA second item, given chance percent of the time
xpXP for each item from reward
blipThe map blip at center
cocaThe plants: a prop spawns at each point when spawn is on, and the Search prompt sits there

Planting

OptionDefaultWhat it does
planting.seed'ls_coca_seed'The usable item that plants a coca plant
planting.max5Plants each player can own at once
planting.anyone_destroytruetrue lets anyone destroy a plant. false keeps it to the owner and police.
planting.collisiontrueRefuses a spot inside an object
planting.requiredPlant Pot x1, remove = trueItems needed to plant. remove = true takes them when the plant goes down.
planting.police0Police needed online to plant
planting.soil.enabletruePlants only go down on the soil types in soil.types
planting.soil.types17 soil hashesThe allowed ground. With setup.debug on, placing a plant prints the hash under it in F8.
planting.soil.ignoreA placeholder at 0, 0, 0Areas (coords, radius) where any ground is allowed, such as a warehouse floor
planting.blacklistA placeholder at 0, 0, 0Areas (coords, radius) where players can't plant
planting.restrict.enablefalsePlayers can only plant inside restrict.whitelist
planting.restrict.whitelistA placeholder at 0, 0, 0Areas (coords, radius) where planting is allowed while restrict.enable is on
planting.stagescoca_growth_1, coca_growth_2, coca_growth_3The prop for each growth stage

Growth

OptionDefaultWhat it does
growth.update_interval15000About how often each plant updates, in milliseconds
growth.startingthirst = 85, hunger = 85, yield = 100, growth = 0A new plant's water, fertilizer, yield and growth, in percent
growth.growth_increasemin = 0.15, max = 0.35Growth added each update
growth.stages[2] = 40, [3] = 90The growth at which a plant moves to stage 2 and stage 3
growth.wateringitem = 'ls_watering_can', min = 8.0, max = 13.0The watering item, and the water one use adds
growth.fertilizingitem = 'ls_fertilizer', min = 10.0, max = 15.0The fertilizer item, and how much one use adds
growth.thirstmin = 0.12, max = 0.3Water lost each update
growth.hungermin = 0.11, max = 0.3Fertilizer lost each update
growth.death20A plant dies when its water or fertilizer falls to this
growth.yield_threshold70Below this water or fertilizer, yield falls each update
growth.yield_decreasemin = 0.4, max = 0.9Yield lost each update below the threshold

Harvest

OptionDefaultWhat it does
harvest.requiredShears x1, remove = falseItems needed to harvest
harvest.add.leaf'ls_coca_leaf'The item a harvest gives
harvest.add.yield_per_10_percent3Leaves for every 10% of yield: 30 at 100%, 15 at 50%
harvest.add.seed1 ls_coca_seed, required_yield = 95The seed given back, only at a yield of required_yield or more
harvest.add.xpmin = 1, max = 1XP for each leaf, to the plant's owner

Tables

OptionDefaultWhat it does
table.item'ls_coke_table'The usable item that places a table
table.model'bkr_prop_coke_table01a'The table prop
table.lockedfalsetrue keeps each table to the player who placed it: only they see it as usable and can pack it up
table.limit1Tables each player can have out
table.collisionstrueTurns the outline red while the table touches an object. A table is refused there either way.
table.police.place0Police needed online to place a table
table.police.use0Police needed online to open a table
table.restrictedA placeholder at 0, 0, 0Areas (coords, radius) where tables can't be placed

Experience

config/shared.lua
experience = {
    [1] = 0,
    [2] = 2500,
    [3] = 10000,
    [4] = 20000,
    [5] = 50000,
    [6] = 100000,
},

The XP each level needs. Level 1 must be 0. Add or remove levels as you like, numbered in order.

Cement

OptionDefaultWhat it does
cement.enabletrueTurns cement collecting on
cement.limit25Bags each player can take until the script restarts
cement.cooldown180Seconds a pallet stays empty after a take, for everyone
cement.dispatchchance = 5, sprite = 133, color = 1, scale = 1.0The chance, in percent, that a take alerts police, and the alert's blip
cement.zonesOne construction siteEach zone has points and thickness (a polygon; ox_lib's /zone command can build one), reward (1 ls_cement), xp (0) and coords, the 36 pallets that get the Take cement prompt

Nothing is spawned for cement: point coords at objects already in the world. Each bag comes with 100 durability.

Supply shop

OptionDefaultWhat it does
shop.enabletrueSpawns the farmer
shop.locationvec4(1901.1145, 4924.4526, 48.8241, 207.5563)Where the farmer stands, and which way they face
shop.model'a_m_m_farmer_01'The ped
shop.scenario'WORLD_HUMAN_DRINKING'What the ped does; nil or false for nothing
shop.hoursmin = 0, max = 24In-game hours the farmer is there. A min above max runs past midnight, such as 21 to 5.
shop.account'cash''cash' or 'bank'
shop.itemsEight itemsEach with item, price, icon and, for the items that need it, metadata: the durability it comes with
shop.blipenable = true, sprite = 280, color = 0, scale = 0.9, label = 'Farmer'The farmer's blip. It shows whenever blip.enable is on, even with the shop off.
config/shared.lua
items = {
    [1] = { item = 'ls_watering_can', price = 15, icon = 'droplet', metadata = 100 },
    [2] = { item = 'ls_fertilizer', price = 20, icon = 'burger', metadata = 100 },
    [3] = { item = 'ls_plant_pot', price = 10, icon = 'plant-wilt' },
    [4] = { item = 'ls_shears', price = 150, icon = 'scissors' },
    [5] = { item = 'ls_baking_soda', price = 15, icon = 'box-archive' },
    [6] = { item = 'ls_empty_baggy', price = 5, icon = 'bag-shopping' },
    [7] = { item = 'ls_gasoline', price = 50, icon = 'gas-pump', metadata = 100 },
    [8] = { item = 'ls_coke_table', price = 5000, icon = 'snowflake' },
},

Labs

labs is a list of labs for sale. Five ship; see buying a lab for their prices and stashes.

config/shared.lua
labs = {
    [1] = {
        enter = vec4(499.6197, -651.9501, 24.9085, 262.6456),
        description = 'A modest lab located in Textile City on Little Bighorn',
        image = 'nui://lation_coke/labs/lab1.jpg',
        icon = 'fas fa-warehouse',
        price = 100000,
        level = 1,
        camrot = vec3(-0.000001, -0.000000, -97.354431),
        storage = {
            [1] = {
                identifier = 'lab1_stash1',
                label = 'Storage',
                coords = vec3(1096.9021, -3192.4685, -38.8690),
                slots = 50,
                weight = 50000
            },
        }
    },
},
FieldWhat it does
enterThe door: where Enter sits, and where players come out
descriptionThe line under the price in Lab Availability
imageThe picture in Lab Availability; nil for none
iconThe icon in Lab Availability
priceWhat the lab costs
levelThe level needed to buy it, or to be handed it by transfer
camrotThe rotation of View Camera. Stand at the door facing away from it, turn on setup.debug and run /getrot.
storageThe stashes inside: identifier (unique across every lab), label, coords, slots and weight

Lab settings

OptionDefaultWhat it does
settings.accountspurchase = 'cash', upgrade = 'cash', sell = 'cash'Where buying and upgrading are paid from and the sale is paid into: 'cash' or 'bank'
settings.entervec4(1088.7609, -3187.5291, -38.9934, 181.0739)Where players arrive inside
settings.exitvec4(1088.7609, -3187.5291, -38.9934, 181.0739)Where Exit sits inside
settings.managevec3(1086.5208, -3194.2824, -39.1940)The laptop, with Manage lab and Confiscate equipment
settings.stations.basic3 positionsThe stations before the equipment upgrade
settings.stations.upgrade5 positionsThe stations after it
settings.limit1Labs each player can own
settings.defaultsstyle = 'basic', security = 'basic'A new lab's equipment and security, 'basic' or 'upgrade'
settings.permissionsmanageDoor = false, viewCamera = false, manageUsers = falseWhat a newly added authorized user can do
settings.upgrades.styleprice = 15000, duration = 60Upgrade Equipment: the price and the minutes it takes
settings.upgrades.securityprice = 10000, duration = 30Install Security: the price and the minutes it takes
settings.selling.confirm'confirm'The word an owner types to sell
settings.selling.refund50Percent of the lab's price paid back on a sale
settings.inactivity.enabletrueReleases labs nobody uses
settings.inactivity.threshold_days30Days without activity before a lab is released
settings.inactivity.check_interval_minutes15How often the server looks for inactive labs
settings.inactivity.force_ejecttruePuts out anyone still inside 10 seconds after a release
settings.blipname = 'Coke Lab', sprite = 473, color = 0, scale = 0.8The owner's blip on their lab

Raids

OptionDefaultWhat it does
raids.policetruePolice can break into locked labs and passcoded stashes
raids.playerstrueEveryone else can too
raids.skillcheck.entrydifficulty = { 'easy', 'easy', 'easy', 'medium', 'medium', 'medium', 'hard' }, inputs = { 'W', 'A', 'S', 'D' }The skill check at a locked door
raids.skillcheck.stashThe sameThe skill check at a passcoded stash

Lab dealer

OptionDefaultWhat it does
dealer.enabletrueSpawns the lab dealer. With it off, the openLabShop export still opens the menu.
dealer.locationvec4(-7.2472, 409.2823, 120.1271, 76.4763)Where the dealer stands
dealer.model'a_m_m_eastsa_02'The ped
dealer.scenario'WORLD_HUMAN_SMOKING'What the ped does; nil or false for nothing
dealer.level1The level needed to open Lab Availability
dealer.hoursmin = 0, max = 24In-game hours the dealer is there
dealer.blipenable = true, sprite = 280, color = 0, scale = 0.8, label = 'Lab Shop'The dealer's blip. It shows whenever blip.enable is on, even with the dealer off.

Cooking

OptionDefaultWhat it does
cooking.uniquetrueEvery player gets their own gasoline and cement windows. false uses each step's range for everyone. See purity.
cooking.dispatch.tablechance = 5, sprite = 133, color = 1, scale = 1.0, radius = 50The chance, in percent, that choosing a table step alerts police, and the alert's blip
cooking.dispatch.labThe sameThe same for lab steps

cooking.table and cooking.lab are the steps under Production, in order. Each step looks like this:

config/shared.lua
[2] = {
    title = locale('table-menu.add-gas-title'),
    description = locale('table-menu.add-gas-desc'),
    icon = 'fas fa-gas-pump',
    iconColor = '',
    gasoline = 'ls_gasoline',
    range = { min = 5, max = 9 },
    penalty = 25,
    required = {
        { item = 'ls_coca_ground', quantity = 5, remove = true },
    },
    add = {
        { item = 'ls_coca_base_unf', quantity = 1, metatype = 'purity' },
    },
    xp = { min = 1, max = 3 },
    event = { name = 'lation_coke:table:addGasoline' }
},
FieldWhat it does
title, descriptionThe row in Production, from locales/en.json
icon, iconColorThe row's icon
requiredWhat the step takes: item, quantity, remove, and metatype = 'purity' on an item that carries purity. Add your own items here. Process Leaves takes its items whatever remove says.
addWhat the step gives, with metatype = 'purity' to pass the purity on. Package uses min and max in place of quantity.
xpXP for the step. min = 0, max = 0, or no xp, gives none.
eventThe event the row runs: name, plus server = true to run it as a server event. See custom steps.
gasoline, cementThe item whose durability the step's slider takes from
rangeThe window of amounts that keeps purity, used while cooking.unique is off
penaltyOn Add Gasoline and Add Cement, the most purity the step can take off. On Cut Brick, the percent of purity a cut takes off.
durationMinutes a timed step takes (Heat & Dry, Cook Coke)
empty_baggyThe item Package uses, one per bag
cutting_agentThe item Cut Brick uses

On Cut Brick and Package, required and add list each brick and what it becomes in the same order, and the player picks a brick.

The shipped table steps (cooking.table):

#StepTakesGivesTimeXPPurity
1Process Leaves20 ls_coca_leaf1 ls_coca_ground1-3
2Add Gasoline5 ls_coca_ground1 ls_coca_base_unf1-3range 5-9, penalty 25
3Add Cement1 ls_coca_base_unf1 ls_coca_base1-3range 15-19, penalty 25
4Heat & Dry1 ls_coca_base1 ls_cocaine_brick60 min10-30, to the table's owner
5Package1 ls_cocaine_brick10-20 ls_cocaine_bag2-5
6Cook Coke, commented out1 ls_cocaine_brick, 1 ls_baking_soda1 ls_crack_brick60 min5-15
7Cut Brick, commented out1 cocaine or crack brick, 1 ls_baking_soda2 of that brick1-3penalty 50

The shipped lab steps (cooking.lab):

#StepTakesGivesTimeXPPurity
1Process Leaves20 ls_coca_leaf1 ls_coca_ground2-4
2Add Gasoline5 ls_coca_ground1 ls_coca_base_unf2-4range 5-9, penalty 20
3Add Cement1 ls_coca_base_unf1 ls_coca_base2-4range 15-19, penalty 20
4Heat & Dry1 ls_coca_base1 ls_cocaine_brick45 min25-50
5Cook Coke1 ls_cocaine_brick, 1 ls_baking_soda1 ls_crack_brick30 min5-15
6Cut Brick1 cocaine or crack brick, 1 ls_baking_soda2 of that brick1-3penalty 35
7Package1 cocaine or crack brick10-20 ls_cocaine_bag or ls_crack_bag3-6

Each step plays the animation with its number in animations.table or animations.lab in config/client.lua, so keep the two in line when you add or move steps.

Consumables

consumables is keyed by item. ls_cocaine_bag and ls_crack_bag ship with the same values:

FieldDefaultWhat it does
usabletrueMakes the item usable
level1The level needed to use it
effects.healthenable = false, amount = 50Health added, up to 200
effects.armorenable = true, amount = 100, max = 100Armor added, up to max
effects.speedenable = true, multiplier = 1.49, duration = 30000Sprint speed (1.49 at most) for duration milliseconds
effects.screenenable = true, effect = 'stoned_monkeys', duration = 30000A screen effect (timecycle modifier)
effects.walkenable = true, clipset = 'move_m@drunk@a', duration = 30000A walking style
effects.shakeenable = true, name = 'DRUNK_SHAKE', intensity = 2.0, duration = 30000A camera shake

Another item added with the same fields becomes usable too.

config/client.lua

Placement controls

OptionDefaultWhat it does
controls.speed0.025How far a table moves each frame. Plants always move 0.025.
controls.rotateL44 (Q)Turns a table left
controls.rotateR38 (E)Turns a table right
controls.forward32 (W)Moves forward
controls.backward33 (S)Moves back
controls.left34 (A)Moves left
controls.right35 (D)Moves right
controls.cancel73 (X)Cancels
controls.confirm22 (Space)Puts it down
controls.disable30, 31, 44, 22, 200Controls turned off while placing

Values are control IDs. The controls shown on screen are text in locales/en.json (textui), so change them with the keys.

Security cameras

OptionDefaultWhat it does
cameras.speed0.15How fast the camera turns and zooms
cameras.timecycle'scanline_cam_cheap'The camera's screen effect
cameras.controlspanUp = 32, panDown = 33, panLeft = 34, panRight = 35, zoomIn = 44, zoomOut = 38, exit = 177W, S, A and D turn the camera. zoomIn (Q) widens the view and zoomOut (E) narrows it. Backspace leaves.
cameras.disable32, 33, 34, 35, 44, 38, 29, 30, 31Controls turned off while watching
cameras.limitspitch = 30.0, yaw = 45.0, fov = { min = 35.0, max = 80.0 }How far the camera turns up and down and to each side, and how far it zooms

Lifetime statistics

OptionDefaultWhat it does
stats.leavestrueThe Leaves line
stats.growntrueThe Plants line
stats.cementtrueThe Cement line
stats.brickstrueThe Bricks line

With all four false, Lifetime Statistics leaves the menus.

Animations

animations holds every progress bar: label, description, icon, duration (milliseconds), position, useWhileDead, canCancel, steps (shown by lation ui), disable, anim and prop. Their labels are written here, not in the locale file.

EntryLabelDuration
searchingSearching..6000
use_tablePlacing table..1500
table[1] to table[7]Processing leaves.., Adding gasoline.., Adding cement.., Placing down.., Packaging.., Placing down.., Cutting..15000, 15000, 15000, 1500, 15000, 1500, 10000
lab[1] to lab[7]Processing leaves.., Adding gasoline.., Adding cement.., Placing down.., Placing down.., Cutting.., Packaging..10000, 10000, 10000, 1500, 1500, 10000, 10000
pickup_tablePicking up table..1500
place_seedPlacing seed..1200
watering.part1Watering..4000
fertilizing.part1Fertilizing..4000
harvestingHarvesting..4000
destroy_plantDestroying..4000
take_cementTaking cement..1500
use_drugSnorting..4500

watering.part2 and fertilizing.part2 hold the can and sack props and their particles. manage_lab, raid_entry, raid_stash and busy are looping animations with no bar.

config/server.lua

OptionDefaultWhat it does
logs.service'none''fivemanage' (needs fmsdk), 'fivemerr' (needs fm-logs), 'discord' or 'none'
logs.screenshotsfalseAdds a screenshot to each log, on Fivemanage and Fivemerr
logs.discord.name'Coke Logs'The webhook's name
logs.discord.link''The webhook URL
logs.discord.imageAn imgur linkThe webhook's picture
logs.discord.footerAn imgur linkThe footer icon

Each event in logs.events is off by default:

EventLogged when
leaves_harvestedA player searches leaves from the field
cement_collectedA player takes cement
table_placedA player places a table
table_brickA player takes a brick from a table
table_packagedA player packages a brick at a table
table_removedA player packs up a table
lab_purchaseA player buys a lab
lab_brickA player takes a brick from a lab station
lab_packagedA player packages a brick in a lab
lab_upgradeAn upgrade finishes while someone is in the lab
lab_doorA player locks or unlocks a lab
lab_transferA player hands a lab to another
lab_soldA player sells a lab

config/icons.lua

Font Awesome icons and colors for every prompt, menu row, input and text UI, such as search_coca = 'fas fa-leaf' and pack_up_color = '#FF5555'. The cooking steps' icons are in cooking, and the shop items' icons in shop.items.

Text UI

The placement and camera controls show through the text UI set at the top of client/functions.lua:

client/functions.lua
-- Options: 'lation_ui', 'ox_lib', 'jg-textui', 'okokTextUI', 'qbcore' & 'custom'
local textui = 'ox_lib'

Language

Every message, menu, prompt, alert, log and dispatch text is in locales/en.json. ox_lib loads the file named by its ox:locale convar, so for another language copy en.json to your language's code (such as de.json), translate it, and set setr ox:locale de in server.cfg. Progress bar labels are in config/client.lua, and blip names and lab descriptions in config/shared.lua.

Still stuck? Ask in our Discord: the people who write the scripts answer.

Last updated November 11, 2026

Making coke

How players gather coca and cement, grow plants, cook bricks at portable tables and in labs, what sets purity, and how labs are bought, upgraded, raided and sold in coke processing.

Developers

The coke processing client and server exports, the notify event, the hooks in its open files, custom cooking steps and the shapes of its player, plant, table and lab data.

On this page

config/shared.luaSetupThe coca fieldPlantingGrowthHarvestTablesExperienceCementSupply shopLabsLab settingsRaidsLab dealerCookingConsumablesconfig/client.luaPlacement controlsSecurity camerasLifetime statisticsAnimationsconfig/server.luaconfig/icons.luaText UILanguage
lation scripts

FiveM scripts for Qbox, QBCore and ESX servers, made to look and work like one product.

store

  • all scripts
  • membership
  • classics

help

  • docs
  • discord
  • email support

legal

  • terms
  • refunds
  • privacy
© 2026 Lation Labslationscripts.com
  • home
  • scripts
  • membership
  • docs