HomeScriptsServicesPortfolioDocumentationContactJoin Discord
FiveM nightlife business documentation

Diamond Bartending Job

Installation, configuration, venue setup, items, commands, ACE permissions, developer exports, security, troubleshooting, and release maintenance for diamond_bartending version 0.16.0.

v0.16.0 RCBeta TestingESXQBCoreox · QS · QBLua 5.4
Diamond Bartending Job
Complete resource guideDocumented from the v0.16.0 hardening candidate
Diamond Bartending v0.16.0

Overview

Diamond Bartending Job is a complete player-run nightlife business resource. It combines precision cocktail preparation, shared stock, customer orders, employee invoices, supplier deliveries, NPC customers, table service, reviews, progression, promotions, analytics, premium distributors, and Superstar VIP visits.

Hands-on bartendingMeasured millilitres, target tolerance, mixing, collection, metadata, and drinking effects.
Connected business economyOrders, invoices, treasury, suppliers, stock reservations, FIFO batches, pricing, and reports.
Living venuePlayer customers, walk-in NPCs, queues, bouncers, tables, waiters, reviews, and Superstar groups.
Release hardeningServer-side validation, request rate limits, duplicate-action protection, startup checks, and health diagnostics.
Current release state
Version 0.16.0 is the release-hardening candidate before v1.0.0. ESX with ox_inventory has completed the full live qualification. Additional advertised framework and inventory combinations are being verified during beta testing.

Compatibility matrix

FrameworkInventoryQualification status
ESXox_inventoryFull live regression, restart, duplication, security, and packaging tests passed.
ESXqs-inventoryCompatible adapter included; beta compatibility verification pending.
ESXqb-inventoryCompatible adapter included; beta compatibility verification pending.
QBCoreox_inventoryCompatible framework/inventory adapters included; beta verification pending.
QBCoreqs-inventoryCompatible framework/inventory adapters included; beta verification pending.
QBCoreqb-inventoryCompatible framework/inventory adapters included; beta verification pending.
Before installation

Requirements

Required resources

  • ox_lib — callbacks, menus, progress interactions, notifications, and utility functions.
  • ox_target — all configured interaction zones and entity targets.
  • oxmysql — persistent businesses, orders, stock, deliveries, reviews, progression, distributors, Superstar visits, and reports.
  • One framework — ESX or QBCore.
  • One inventory — ox_inventory, qs-inventory, or qb-inventory.
  • OneSync enabled for networked couriers, NPC customers, waiters, and Superstar guests.
  • A compatible bar, nightclub, restaurant, or lounge MLO.
  • A server artifact and framework build current enough for Lua 5.4 and modern ox resources.
Start dependencies first
oxmysql, ox_lib, the selected framework, inventory, and ox_target must be ready before diamond_bartending.
Clean installation

Installation

  1. Download and extract.

    Place the folder in your server resources directory and keep the resource folder named diamond_bartending.

  2. Install dependencies.

    Verify oxmysql, ox_lib, ox_target, your framework, and your chosen inventory start correctly.

  3. Add inventory items and images.

    Use the included snippets and copy the 13 PNG files to the image directory used by your inventory.

  4. Prepare jobs.

    Review shared/jobs.lua and the included QBCore job snippet. Confirm the configured job name and boss grade match your server.

  5. Prepare the database.

    Leave Config.Database.autoInstall = true for automatic schema installation, or import install/diamond_bartending.sql manually.

  6. Configure the venue.

    Update business coordinates, targets, tables, queue positions, waiter corner, courier points, bouncers, VIP seats, and camera data.

  7. Add ACE permissions.

    Grant only the administrative commands that your staff require.

  8. Start and test.

    Restart the resource, run dbhealth, and complete the first-run acceptance test below.

Recommended server.cfg order

cfg
# Core dependencies
ensure oxmysql
ensure ox_lib

# Framework (choose one)
ensure es_extended
# ensure qb-core

# Inventory (choose one)
ensure ox_inventory
# ensure qs-inventory
# ensure qb-inventory

# Target
ensure ox_target

# Diamond Bartending last
ensure diamond_bartending

First health check

console
dbhealth

A healthy ESX/ox installation reports a line similar to:

text
[diamond_bartending:health] v0.16.0 · ready yes · database yes · esx/ox

Default job and grades

shared/jobs.lua registers a job named bar when it does not already exist. Existing job definitions are not overwritten.

GradeRoleDefault salary
0Trainee Bartender50
1Bartender75
2Senior Bartender100
3Bar Manager125
4Bar Owner / boss150
Custom job names
When changing the default bar job, update both shared/jobs.lua and each business entry that references the job. Confirm the configured bossGrade matches the framework grade used for owners.
Inventory setup

Items & Images

The package includes one metadata-driven finished cocktail item and twelve configured bottle/ingredient items.

ItemPurpose
db_cocktailFinished cocktail item carrying recipe, preparation, alcohol, quality, and consumption metadata.
db_vodka, db_gin, db_white_rum, db_tequila, db_whiskeyAlcohol ingredients used by the shared business stock system.
db_blue_curacao, db_grenadine, db_simple_syrupLiqueur and syrup ingredients.
db_lemon_juice, db_orange_juice, db_cola, db_tonic_waterJuices and mixers.

Included inventory files

  • install/ox_inventory/items_snippet.lua
  • install/qb_inventory/items_snippet.lua
  • install/qs_inventory/INSTALL.md
  • install/images/*.png

Typical image destinations

InventoryImage directory
ox_inventoryox_inventory/web/images/
qs-inventoryqs-inventory/html/images/
qb-inventoryqb-inventory/html/images/
Shared stock is database-backed
Bottle ingredients are not removed from an employee’s personal inventory during preparation. Supplier deliveries create persistent business stock measured in millilitres; the inventory adapter awards and consumes finished cocktails.
Editable Lua files

Configuration Reference

Main configuration groups

ConfigurationControls
Config.Framework, Config.FrameworkPriorityAutomatic or fixed ESX/QBCore detection.
Config.TargetTarget resource settings and interaction behaviour.
Config.UITheme, dark mode, sounds, display preferences, and interface behaviour.
Config.NotificationsInternal, ox, framework, or external notification routing.
Config.PouringFlow rate, controls, visual target, audio, and precision behaviour.
Config.ProgressionXP levels, unlocks, tips, perfect-pour tracking, and performance.
Config.Catalogue, Config.RecipesBusiness catalogue loading, recipe matching, tolerance, and unknown mixtures.
Config.ProximityMLO-safe server/client proximity validation and diagnostics.
Config.SecurityRequest readiness, payload limits, token-bucket rate limits, and endpoint overrides.
Config.InventoryInventory selection, item metadata, image paths, and collection behaviour.
Config.DrinkCreatorCommand, permissions, owner access, limits, item modes, and image gallery.
Config.DatabaseAutomatic schema installation and migrations.
Config.StockLow-stock percentage and stock administration command.
Config.SuppliersDelivery mode, limits, timing, courier, notifications, and claims.
Config.OrderingOrder timing, payments, stock reservations, pickup, and preparation rules.
Config.NPCCustomersSpawning, names, models, queue, patience, service, and cleanup.
Config.TableServicePlayer tables, waiter limits, assignments, markers, and delivery.
Config.GuestExperienceReviews, review board, bouncers, venue feedback, and satisfaction.
Config.DistributorsStandard/Reserve/Heritage/Diamond tiers, unlocks, multipliers, and stock tabs.
Config.SuperstarsQualification, groups, rewards, cooldowns, visits, and host range.
Config.OperationsOpening hours, promotions, Cocktail of the Day, events, analytics, and reports.
Config.ManagementBoss permissions, employee tools, treasury, catalogue, and dashboard.
Config.BillingEmployee invoices and business payment handling.
Config.ConsumptionDrink-use validation, animations, props, alcohol, taste, and effects.
Config.AvatarPreview ped, camera, idle, pour, and mix presentation.
Config.BusinessesEvery venue-specific job, target, table, queue, courier, waiter, bouncer, VIP, and camera coordinate.

Editable data files

FilePurpose
shared/config.luaMain systems and venue configuration.
shared/jobs.luaDuplicate-safe job and grade setup.
shared/ingredients.luaIngredient IDs, labels, inventory names, capacities, and alcohol values.
shared/suppliers.luaSupplier catalogue, bottle prices, and availability.
shared/bottles.luaBottle labels, ingredient links, shelf placement, guide amounts, and images.
shared/recipes.luaDefault cocktails, measurements, prices, categories, and unlock levels.
Venue configuration

Business, Targets & Coordinates

Each entry in Config.Businesses represents one independent bar business. Duplicate the supplied bar1 structure when adding another venue, then change every unique ID and coordinate.

Core business fields

lua
Config.Businesses = {
    bar1 = {
        label = 'Diamond Bar',
        job = 'bartender',
        bossGrade = 4,
        -- venue-specific targets, tables, NPCs,
        -- waiter, courier, bouncer, VIP and camera data
    },
}

Protected interaction targets

  • Bartender station
  • Customer menu
  • Pickup counter
  • Boss menu
  • Stockroom
  • Supplier terminal
  • Review board
  • Player tables
Unique IDs matter
When adding a second business, change the business ID, target IDs, table IDs, stockroom target ID, and any other identifiers. Reusing IDs can cause the wrong target or business data to be selected.

Recommended coordinate workflow

  1. Stand at the exact interaction point and record the centre coordinate.
  2. Set an appropriate heading and box-zone size.
  3. Test from every side of the counter or prop.
  4. Configure table customerSeat and servicePoint separately.
  5. Place NPC queue positions in walking order from the counter outward.
  6. Keep courier and Superstar spawn points outside the interior with a clear navmesh route.
  7. Run /dbproximity <playerId> [businessId] if an MLO target reports “too far.”
How the resource plays

Gameplay Workflows

Player customer order

  1. Customer opens the menu and adds cocktails to the basket.
  2. The server validates business status, pricing, payment method, table state, and stock.
  3. Stock is reserved for the order.
  4. An eligible employee claims the ticket and prepares each cocktail.
  5. The bartender pours, mixes, and collects the drink.
  6. The order moves to pickup or assigned table delivery.
  7. The customer receives the cocktail and the transaction/statistics are completed once.

Supplier flow

  1. Boss or eligible employee opens the supplier terminal.
  2. The server validates the selected distributor, business balance, limits, and purchase.
  3. A persistent delivery record is created.
  4. The courier travels to the configured destination when physical courier mode is enabled.
  5. Stock waits in the stockroom until an eligible employee claims it.
  6. Bottles become persistent FIFO stock batches.

NPC and table service

  1. An opted-in business receives walk-in guests based on the configured conditions.
  2. Guests queue, take a table or order, and generate a stock-valid ticket.
  3. Staff prepare the drinks through the normal precision flow.
  4. An NPC waiter or assigned employee delivers the order.
  5. Guests consume, react, publish a review, and leave.

FIFO distributor behaviour

Distributor tabs are views only. The server always consumes the oldest remaining delivery batch first. An older Reserve batch is therefore used before a newer Standard batch. The active batch’s multiplier affects pour speed but never guarantees a perfect measurement.

Persistent systems

Database & Data Safety

The supplied SQL and automatic installer define the same 31 Diamond Bartending tables. No SQL change is required when updating from v0.15.4 to v0.16.0.

Persistent data includes

  • Business records, balances, employees, transactions, and catalogue prices
  • Orders, preparation state, pickup, invoices, reservations, and delivery assignments
  • Supplier purchases, courier state, stockroom claims, stock totals, reservations, and FIFO batches
  • Bartender XP, levels, perfect pours, tips, and performance statistics
  • NPC service preferences, reviews, business ratings, promotions, events, analytics, and reports
  • Distributor unlocks, Superstar qualification, visits, rewards, and cooldowns
  • Database-backed cocktails created through the Drinks Creator

Included tables

  • diamond_bartending_schema
  • diamond_bartending_businesses
  • diamond_bartending_bottles
  • diamond_bartending_prices
  • diamond_bartending_catalogue
  • diamond_bartending_orders
  • diamond_bartending_order_items
  • diamond_bartending_order_reservations
  • diamond_bartending_prepared_drinks
  • diamond_bartending_invoices
  • diamond_bartending_invoice_items
  • diamond_bartending_transactions
  • diamond_bartending_deliveries
  • diamond_bartending_delivery_items
  • diamond_bartending_service_deliveries
  • diamond_bartending_bartenders
  • diamond_bartending_npc_customers
  • diamond_bartending_created_drinks
  • diamond_bartending_business_operations
  • diamond_bartending_promotions
  • diamond_bartending_business_events
  • diamond_bartending_reports
  • diamond_bartending_order_discounts
  • diamond_bartending_table_reservations
  • diamond_bartending_order_service
  • diamond_bartending_reviews
  • diamond_bartending_distributor_unlocks
  • diamond_bartending_delivery_distributors
  • diamond_bartending_stock_batches
  • diamond_bartending_pour_stats
  • diamond_bartending_superstar_visits

Automatic or manual installation

lua
Config.Database = {
    autoInstall = true,
    cleanStockOnMigration = true,
    cleanStockMigrationKey = 'v0_5_0_clean_stock',
}
Back up before updates
Back up the resource and database before replacing a release. Never repeatedly change a completed migration key unless you intentionally want that migration to run again.
Administration

Commands & ACE Permissions

CommandPurposeACE
/dbhealthPrint startup, database, framework, inventory, request, and security diagnostics.diamond_bartending.health.admin
/dbproximity <playerId> [businessId]Diagnose target distances and MLO-safe client position reports.diamond_bartending.proximity.admin
/dbstockadd <business> <ingredient> <count>Add full bottles to shared stock.diamond_bartending.stock
/dbdistributors status [businessId]Show ratings, perfect pours, and tier status.diamond_bartending.distributors.admin
/dbdistributors unlock|lock <businessId> <tierId>Manually change distributor access.diamond_bartending.distributors.admin
/dbdistributors refresh [businessId]Recalculate requirement-based unlocks.diamond_bartending.distributors.admin
/dbsuperstars status [businessId]Show qualification, cooldown, and active visit.diamond_bartending.superstars.admin
/dbsuperstars force [businessId] [groupId]Start a configured Superstar visit.diamond_bartending.superstars.admin
/dbsuperstars reset [businessId]Cancel the active visit and reset cooldown.diamond_bartending.superstars.admin
/dbreviews delete <id>Delete one published review.diamond_bartending.reviews.admin
/dbreviews reset <businessId>Remove reviews for one business.diamond_bartending.reviews.admin
/dbreviews recalculate <businessId>Recalculate the business rating summary.diamond_bartending.reviews.admin
/drinkscreatorOpen the database-backed cocktail creator for an authorised admin or owner.diamond_bartending.drinkscreator
/closebartendingClient command to close/reset the bartending interface.None

Recommended ACE entries

cfg
add_ace group.admin diamond_bartending.health.admin allow
add_ace group.admin diamond_bartending.proximity.admin allow
add_ace group.admin diamond_bartending.stock allow
add_ace group.admin diamond_bartending.distributors.admin allow
add_ace group.admin diamond_bartending.superstars.admin allow
add_ace group.admin diamond_bartending.reviews.admin allow
add_ace group.admin diamond_bartending.drinkscreator allow
External integrations

Developer API

Client exports

ExportPurpose
exports.diamond_bartending:useCocktail(data, slot)ox_inventory item-use export for the metadata cocktail.
exports.diamond_bartending:getAlcoholLevel()Returns the local player’s current accumulated alcohol level.
exports.diamond_bartending:clearConsumptionEffects()Clears active Diamond Bartending consumption effects.

Server exports

ExportPurpose
AddBottleStock(businessId, ingredientId, count, capacityMl)Adds full bottles to a business and returns the stock result.
GetBusinessStock(businessId)Returns the current shared stock payload.
IsBusinessOpen(businessId)Returns the evaluated open/closed business state.
GetBusinessOperations(businessId)Returns the public operations payload.
GetActivePromotion(businessId, recipeId)Returns the matched promotion and calculated final price.
GetBusinessSales(businessId, rangeKey)Returns analytics for today, 7d, 30d, or another accepted range.
GetTopCocktails(businessId, rangeKey)Returns cocktail ranking data from analytics.
GetStockReport(businessId)Returns stock summary and detailed stock rows.
GetBusinessReports(businessId)Returns stored business reports.
StartBusinessEvent(businessId, payload)Creates an operational event; returns the event or an error code.
StopBusinessEvent(businessId, eventId)Archives/stops an active event.

Examples

lua
-- Server: add five 750ml vodka bottles
local ok, errorCode, stock = exports.diamond_bartending:AddBottleStock(
    'bar1', 'vodka', 5, 750
)

-- Server: check whether the business may accept orders
local isOpen, reason = exports.diamond_bartending:IsBusinessOpen('bar1')

-- Server: fetch seven-day analytics
local analytics = exports.diamond_bartending:GetBusinessSales('bar1', '7d')

-- Client: read the local player's alcohol level
local alcohol = exports.diamond_bartending:getAlcoholLevel()
Release hardening

Security & Health Diagnostics

All 60 server callbacks and 23 client-triggered server events pass through the shared request guard in v0.16.0.

Included safeguards

  • Per-player, per-endpoint token-bucket rate limits
  • Duplicate-click protection on financial, stock, order, delivery, reservation, review, and management mutations
  • Payload depth, node, and string-length limits
  • Startup-readiness rejection before framework/database initialisation finishes
  • Source validation and rejected-request diagnostics
  • Server-side distance and MLO-safe proximity checks
  • Rate bucket cleanup when players disconnect

Reading dbhealth

text
ready yes      resource startup completed
database yes   schema/database layer is available
esx/ox         detected framework and inventory
requests       accepted + blocked guarded requests
blocked        total rejected requests
rate           token-bucket rate-limit rejections
startup        requests rejected before ready
payload        malformed/oversized payload rejections
source         invalid source rejections
A small blocked count can be healthy
During deliberate duplicate-click testing, the live candidate processed 919 legitimate requests and blocked two rate-limited repeats without interrupting normal gameplay.
Common setup problems

Troubleshooting

ProblemWhat to check
Resource stops during startup validationDelete the old web/dist, copy the complete current build, and confirm fxmanifest, shared version, package, lockfile, and web/dist/build.json show the same version.
dbhealth shows database noStart oxmysql first, verify credentials, inspect the first database error, and confirm automatic installation or manual SQL completed.
Targets do not appearConfirm ox_target is running and the business target configuration is enabled.
Target says too far inside the MLORun /dbproximity <playerId> [businessId], then review zone centres, dimensions, server ped coordinates, and client fallback reports.
Customer cannot checkoutConfirm the business is open, payment method is available, catalogue price exists, table state is valid, and enough unreserved stock remains.
Bartender cannot claim or prepareVerify the configured job name, employee grade, duty state, order status, and business ID.
Finished cocktail is missingAdd db_cocktail, verify the selected inventory adapter and image path, and confirm collection succeeded only once.
Supplier stock never arrivesCheck delivery delay, courier settings, host availability, destination pathing, business balance, and delivery status.
NPCs do not spawnConfirm NPC service is enabled, the business is open, eligible staff requirements are met, spawn/exit paths are valid, and OneSync is enabled.
Waiter cannot reach a tableReview waiter corner, customer seat, service point, navmesh, blocked props, and maximum waiter settings.
Premium distributor remains lockedRun distributor status/refresh and check rating, perfect-pour requirement, admin lock, and business ID.
Superstar visit does not qualifyCheck rating, daily review count, consecutive-day requirement, cooldown, online staff, VIP table availability, and configured group.
NUI shows an old versionDelete old web/dist before copying the release, clear the client cache, and restart the resource.
Normal action is rate-limitedDo not spam-click. Review custom UI loops and Config.Security overrides before increasing limits.

Debug mode

lua
Config.Debug = true
Config.Security.logRejectedRequests = true

Disable verbose logging after diagnosis.

Escrow and maintenance

Updates & File Reference

Recommended escrow-ignore files

lua
escrow_ignore {
    'shared/config.lua',
    'shared/jobs.lua',
    'shared/ingredients.lua',
    'shared/suppliers.lua',
    'shared/bottles.lua',
    'shared/recipes.lua',
    'install/**/*.lua',
}

Keep shared/catalogs.lua, shared/version.lua, all client modules, all server modules, and framework/runtime bridges protected.

Safe update procedure

  1. Back up the resource and database.
  2. Back up the six editable shared files and custom installation snippets.
  3. Read the release notes and affected-file list.
  4. Stop diamond_bartending.
  5. Delete the existing web/dist directory.
  6. Copy the new full release or the documented drop-in patch.
  7. Merge new configuration keys instead of blindly replacing customised files.
  8. Restart dependencies, then the resource.
  9. Run dbhealth and repeat the acceptance test.

First-run acceptance test

  • dbhealth reports ready yes and database yes.
  • All eight protected interaction targets open inside the MLO.
  • Customer checkout, cancellation, preparation, pickup, and consumption work.
  • Employee invoice creation, response, payment, expiry, and cancellation work.
  • Supplier purchase, courier arrival, stockroom claim, and FIFO deduction work.
  • Player table reservation, checkout, waiter assignment, delivery, and release work.
  • NPC customers complete order, service, review, departure, and cleanup.
  • A forced Superstar visit completes from spawn through cooldown.
  • Restart and disconnect recovery preserve applicable orders, deliveries, tables, NPCs, and VIP visits.
  • Repeated submissions cannot duplicate payments, stock, rewards, collection, or delivery.
Need more help?

Still stuck after following the guide?

Open a Discord ticket with the resource version, framework, inventory, relevant configuration, complete console error, and steps to reproduce.