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.
Compatibility matrix
| Framework | Inventory | Qualification status |
|---|---|---|
| ESX | ox_inventory | Full live regression, restart, duplication, security, and packaging tests passed. |
| ESX | qs-inventory | Compatible adapter included; beta compatibility verification pending. |
| ESX | qb-inventory | Compatible adapter included; beta compatibility verification pending. |
| QBCore | ox_inventory | Compatible framework/inventory adapters included; beta verification pending. |
| QBCore | qs-inventory | Compatible framework/inventory adapters included; beta verification pending. |
| QBCore | qb-inventory | Compatible framework/inventory adapters included; beta verification pending. |
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.
Recommended environment
- 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.
oxmysql, ox_lib, the selected framework, inventory, and ox_target must be ready before diamond_bartending.Installation
- Download and extract.
Place the folder in your server resources directory and keep the resource folder named
diamond_bartending. - Install dependencies.
Verify oxmysql, ox_lib, ox_target, your framework, and your chosen inventory start correctly.
- Add inventory items and images.
Use the included snippets and copy the 13 PNG files to the image directory used by your inventory.
- Prepare jobs.
Review
shared/jobs.luaand the included QBCore job snippet. Confirm the configured job name and boss grade match your server. - Prepare the database.
Leave
Config.Database.autoInstall = truefor automatic schema installation, or importinstall/diamond_bartending.sqlmanually. - Configure the venue.
Update business coordinates, targets, tables, queue positions, waiter corner, courier points, bouncers, VIP seats, and camera data.
- Add ACE permissions.
Grant only the administrative commands that your staff require.
- Start and test.
Restart the resource, run
dbhealth, and complete the first-run acceptance test below.
Recommended server.cfg order
# 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_bartendingFirst health check
dbhealthA healthy ESX/ox installation reports a line similar to:
[diamond_bartending:health] v0.16.0 · ready yes · database yes · esx/oxDefault job and grades
shared/jobs.lua registers a job named bar when it does not already exist. Existing job definitions are not overwritten.
| Grade | Role | Default salary |
|---|---|---|
| 0 | Trainee Bartender | 50 |
| 1 | Bartender | 75 |
| 2 | Senior Bartender | 100 |
| 3 | Bar Manager | 125 |
| 4 | Bar Owner / boss | 150 |
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.Items & Images
The package includes one metadata-driven finished cocktail item and twelve configured bottle/ingredient items.
| Item | Purpose |
|---|---|
db_cocktail | Finished cocktail item carrying recipe, preparation, alcohol, quality, and consumption metadata. |
db_vodka, db_gin, db_white_rum, db_tequila, db_whiskey | Alcohol ingredients used by the shared business stock system. |
db_blue_curacao, db_grenadine, db_simple_syrup | Liqueur and syrup ingredients. |
db_lemon_juice, db_orange_juice, db_cola, db_tonic_water | Juices and mixers. |
Included inventory files
install/ox_inventory/items_snippet.luainstall/qb_inventory/items_snippet.luainstall/qs_inventory/INSTALL.mdinstall/images/*.png
Typical image destinations
| Inventory | Image directory |
|---|---|
| ox_inventory | ox_inventory/web/images/ |
| qs-inventory | qs-inventory/html/images/ |
| qb-inventory | qb-inventory/html/images/ |
Configuration Reference
Main configuration groups
| Configuration | Controls |
|---|---|
Config.Framework, Config.FrameworkPriority | Automatic or fixed ESX/QBCore detection. |
Config.Target | Target resource settings and interaction behaviour. |
Config.UI | Theme, dark mode, sounds, display preferences, and interface behaviour. |
Config.Notifications | Internal, ox, framework, or external notification routing. |
Config.Pouring | Flow rate, controls, visual target, audio, and precision behaviour. |
Config.Progression | XP levels, unlocks, tips, perfect-pour tracking, and performance. |
Config.Catalogue, Config.Recipes | Business catalogue loading, recipe matching, tolerance, and unknown mixtures. |
Config.Proximity | MLO-safe server/client proximity validation and diagnostics. |
Config.Security | Request readiness, payload limits, token-bucket rate limits, and endpoint overrides. |
Config.Inventory | Inventory selection, item metadata, image paths, and collection behaviour. |
Config.DrinkCreator | Command, permissions, owner access, limits, item modes, and image gallery. |
Config.Database | Automatic schema installation and migrations. |
Config.Stock | Low-stock percentage and stock administration command. |
Config.Suppliers | Delivery mode, limits, timing, courier, notifications, and claims. |
Config.Ordering | Order timing, payments, stock reservations, pickup, and preparation rules. |
Config.NPCCustomers | Spawning, names, models, queue, patience, service, and cleanup. |
Config.TableService | Player tables, waiter limits, assignments, markers, and delivery. |
Config.GuestExperience | Reviews, review board, bouncers, venue feedback, and satisfaction. |
Config.Distributors | Standard/Reserve/Heritage/Diamond tiers, unlocks, multipliers, and stock tabs. |
Config.Superstars | Qualification, groups, rewards, cooldowns, visits, and host range. |
Config.Operations | Opening hours, promotions, Cocktail of the Day, events, analytics, and reports. |
Config.Management | Boss permissions, employee tools, treasury, catalogue, and dashboard. |
Config.Billing | Employee invoices and business payment handling. |
Config.Consumption | Drink-use validation, animations, props, alcohol, taste, and effects. |
Config.Avatar | Preview ped, camera, idle, pour, and mix presentation. |
Config.Businesses | Every venue-specific job, target, table, queue, courier, waiter, bouncer, VIP, and camera coordinate. |
Editable data files
| File | Purpose |
|---|---|
shared/config.lua | Main systems and venue configuration. |
shared/jobs.lua | Duplicate-safe job and grade setup. |
shared/ingredients.lua | Ingredient IDs, labels, inventory names, capacities, and alcohol values. |
shared/suppliers.lua | Supplier catalogue, bottle prices, and availability. |
shared/bottles.lua | Bottle labels, ingredient links, shelf placement, guide amounts, and images. |
shared/recipes.lua | Default cocktails, measurements, prices, categories, and unlock levels. |
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
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
Recommended coordinate workflow
- Stand at the exact interaction point and record the centre coordinate.
- Set an appropriate heading and box-zone size.
- Test from every side of the counter or prop.
- Configure table
customerSeatandservicePointseparately. - Place NPC queue positions in walking order from the counter outward.
- Keep courier and Superstar spawn points outside the interior with a clear navmesh route.
- Run
/dbproximity <playerId> [businessId]if an MLO target reports “too far.”
Gameplay Workflows
Player customer order
- Customer opens the menu and adds cocktails to the basket.
- The server validates business status, pricing, payment method, table state, and stock.
- Stock is reserved for the order.
- An eligible employee claims the ticket and prepares each cocktail.
- The bartender pours, mixes, and collects the drink.
- The order moves to pickup or assigned table delivery.
- The customer receives the cocktail and the transaction/statistics are completed once.
Supplier flow
- Boss or eligible employee opens the supplier terminal.
- The server validates the selected distributor, business balance, limits, and purchase.
- A persistent delivery record is created.
- The courier travels to the configured destination when physical courier mode is enabled.
- Stock waits in the stockroom until an eligible employee claims it.
- Bottles become persistent FIFO stock batches.
NPC and table service
- An opted-in business receives walk-in guests based on the configured conditions.
- Guests queue, take a table or order, and generate a stock-valid ticket.
- Staff prepare the drinks through the normal precision flow.
- An NPC waiter or assigned employee delivers the order.
- 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.
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_schemadiamond_bartending_businessesdiamond_bartending_bottlesdiamond_bartending_pricesdiamond_bartending_cataloguediamond_bartending_ordersdiamond_bartending_order_itemsdiamond_bartending_order_reservationsdiamond_bartending_prepared_drinksdiamond_bartending_invoicesdiamond_bartending_invoice_itemsdiamond_bartending_transactionsdiamond_bartending_deliveriesdiamond_bartending_delivery_itemsdiamond_bartending_service_deliveriesdiamond_bartending_bartenders
diamond_bartending_npc_customersdiamond_bartending_created_drinksdiamond_bartending_business_operationsdiamond_bartending_promotionsdiamond_bartending_business_eventsdiamond_bartending_reportsdiamond_bartending_order_discountsdiamond_bartending_table_reservationsdiamond_bartending_order_servicediamond_bartending_reviewsdiamond_bartending_distributor_unlocksdiamond_bartending_delivery_distributorsdiamond_bartending_stock_batchesdiamond_bartending_pour_statsdiamond_bartending_superstar_visits
Automatic or manual installation
Config.Database = {
autoInstall = true,
cleanStockOnMigration = true,
cleanStockMigrationKey = 'v0_5_0_clean_stock',
}Commands & ACE Permissions
| Command | Purpose | ACE |
|---|---|---|
/dbhealth | Print 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 |
/drinkscreator | Open the database-backed cocktail creator for an authorised admin or owner. | diamond_bartending.drinkscreator |
/closebartending | Client command to close/reset the bartending interface. | None |
Recommended ACE entries
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 allowDeveloper API
Client exports
| Export | Purpose |
|---|---|
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
| Export | Purpose |
|---|---|
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
-- 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()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
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 rejectionsTroubleshooting
| Problem | What to check |
|---|---|
| Resource stops during startup validation | Delete 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 no | Start oxmysql first, verify credentials, inspect the first database error, and confirm automatic installation or manual SQL completed. |
| Targets do not appear | Confirm ox_target is running and the business target configuration is enabled. |
| Target says too far inside the MLO | Run /dbproximity <playerId> [businessId], then review zone centres, dimensions, server ped coordinates, and client fallback reports. |
| Customer cannot checkout | Confirm the business is open, payment method is available, catalogue price exists, table state is valid, and enough unreserved stock remains. |
| Bartender cannot claim or prepare | Verify the configured job name, employee grade, duty state, order status, and business ID. |
| Finished cocktail is missing | Add db_cocktail, verify the selected inventory adapter and image path, and confirm collection succeeded only once. |
| Supplier stock never arrives | Check delivery delay, courier settings, host availability, destination pathing, business balance, and delivery status. |
| NPCs do not spawn | Confirm 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 table | Review waiter corner, customer seat, service point, navmesh, blocked props, and maximum waiter settings. |
| Premium distributor remains locked | Run distributor status/refresh and check rating, perfect-pour requirement, admin lock, and business ID. |
| Superstar visit does not qualify | Check rating, daily review count, consecutive-day requirement, cooldown, online staff, VIP table availability, and configured group. |
| NUI shows an old version | Delete old web/dist before copying the release, clear the client cache, and restart the resource. |
| Normal action is rate-limited | Do not spam-click. Review custom UI loops and Config.Security overrides before increasing limits. |
Debug mode
Config.Debug = true
Config.Security.logRejectedRequests = trueDisable verbose logging after diagnosis.
Updates & File Reference
Recommended escrow-ignore files
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
- Back up the resource and database.
- Back up the six editable shared files and custom installation snippets.
- Read the release notes and affected-file list.
- Stop
diamond_bartending. - Delete the existing
web/distdirectory. - Copy the new full release or the documented drop-in patch.
- Merge new configuration keys instead of blindly replacing customised files.
- Restart dependencies, then the resource.
- Run
dbhealthand repeat the acceptance test.
First-run acceptance test
dbhealthreports 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.
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.
