Discord Store
Restaurants

Configuration

General settings are in config/config.lua. Many can also be changed in game on the creator's Settings tab.

Files

FileWhat's in it
config/config.luaGeneral settings (below)
config/restaurants.luaRestaurants shipped in a file: menus, recipes, stations, ownership, plus Config.IngredientPickupLocations
config/server.luaServer-only: Discord logging
data/ingredients.jsonEvery ingredient: label, weight, shop price, cutting
data/animations.luaCooking, station and ped animations
locales/en.jsonAll text
client/utils.lua, server/utils.luaEditable hooks: vehicle keys, wardrobe, progress bar, extra permission checks, sale hook, log sink
Values changed on the creator's Settings tab are saved in the database and override config.lua until you press Reset to config.lua.

Main options

OptionDefaultDescription
Interaction'textui''target' (falls back to text UI if no target) or 'textui'
InteractionDistance2.0Client interaction distance
MaxStationDistance5.0Server-side max distance for station actions
AllowFreeRecipestrueCreator may make recipes with no ingredients
IngredientItems'real''carriers' (ox / tgiann / jaksam) or 'real'
CookFromStashtrueCooking can use ingredients from the kitchen stash
HandWashingoffRequire hand washing every ValidMinutes
RequireDutytrueStaff must be on duty to use stations
AdminAce'dh_restaurants.admin'Ace for admin commands
SocietyMode'auto''auto', 'framework' or 'internal'
DashboardAccess'boss''owner', 'boss' or 'all_employees' (view only)
PriceEditAccess'owner'Who gets the Prices tab: 'owner' or 'manage'
MaxItemQuantity / MaxCartLines5000 / 3000Cart limits
ImagePath'auto'Menu image path, or your own like 'nui://qs-inventory/html/images/%s.png'
OfflineShoptrueSelf-service menu when nobody's on duty
ReceiptItem'dh_receipt'Item given on completed kitchen orders ('' = none)
InGameCreatortrueEnable /restaurantcreator
CustomRecipeItems{}Extra items dashboard recipes may produce
ShowBlips / DefaultBliptrue / sprite 106Map blips and the blip for new creator restaurants
CartMarker / MaxCartPointsring / 20Default counter marker and max counters per restaurant

Society money

ModeDescription
'auto'Uses the job's society account if a society/banking resource is found, otherwise 'internal'
'framework'Uses the job's society through dh_bridge: Renewed-Banking, qb-banking, qb-management, esx_addonaccount. Account = restaurant.society or restaurant.job
'internal'Balance stored by the script. Works everywhere, no extra resources

Kitchen orders

config/config.lua
Config.Orders = {
    Enabled            = true,
    HandoffDistance    = 5.0,   -- staff <-> customer distance to complete
    ExpireMinutes      = 30,    -- unfinished orders are refunded
    MaxOpenPerCustomer = 3,
}

Ingredient pickups

With pickups on, ordering ingredients on the dashboard no longer drops them straight into the stash:

  1. A boss places the order on the Ingredients tab. The society pays and it shows under Awaiting pickup (cancellable for a full refund until someone starts it)
  2. An on-duty employee goes to the dropoff station, presses [E] Ingredient orders and picks one
  3. GPS leads to a supplier from Config.IngredientPickupLocations. [E] Collect ingredient order loads the box
  4. They bring it back (it rides along in a vehicle) and press [E] Drop off ingredients. The items go into the kitchen stash

Nothing exists in anyone's inventory until drop-off, so orders can't be kept or sold on the way.

config/config.lua
Config.IngredientPickup = {
    Enabled          = true,
    RequireVehicle   = false,   -- delivery vehicle must be parked near supplier + drop-off
    VehicleDistance  = 35.0,
    MaxOpenOrders    = 10,
    ExpireMinutes    = 180,     -- uncollected orders are refunded
    TimeoutMinutes   = 30,      -- started pickups go back to the list after this
    MinTravelSeconds = 20,      -- anti-teleport
    PickLocation     = 'random',  -- 'random' | 'nearest'
    CarryProp        = 'hei_prop_heist_box',
    DropoffMarker    = { type = 'chevron', size = 1.0, color = '#3FA9F5' },
    CancelCommand    = 'cancelpickup',
}

Player ownership

config/config.lua
Config.PlayerOwned = true
Config.Ownership = {
    MaxPerPlayer    = 1,
    PaymentAccount  = 'bank',
    SellBackPercent = 50,      -- % of base price when selling to the city
    SaleTaxPercent  = 5,       -- % taken from player-to-player sales
    MinListPrice    = 10000,
    MaxListPrice    = 999999999,
    GiveOwnerJob    = true,    -- buyer gets the job at its top grade
    UnemployedJob   = 'unemployed',
}

NPC deliveries

config/config.lua
Config.NPCDeliveries          = true
Config.DeliveryMoney          = { min = 150, max = 400 }
Config.DeliveryFromStock      = true   -- take food from shop stock (must be cooked first)
Config.DeliveryCooldown       = 60
Config.DeliveryMinSeconds     = 30
Config.DefaultDeliveryVehicle = 'speedo'
Config.VehiclePlatePrefix     = 'FOOD'

Action timings

The server refuses to complete an action faster than about 90% of these (ms):

config/config.lua
Config.AnimDurations = {
    cutting = 5000, frying = 12000, bbq = 15000, drink = 5000, food = 7000,
    iceMachine = 4000, delivery = 3000, pickup = 4000, dropoff = 3000,
}

Discord logs

config/server.lua
ServerConfig.DiscordLogs      = true
ServerConfig.DiscordWebhook   = GetConvar('dh_restaurants_webhook', '')
ServerConfig.DiscordName      = 'Restaurants'
ServerConfig.MaxLogsPerMinute = 25   -- extra posts are dropped

In-game creator

/restaurantcreator opens a tablet with four tabs:

  • Collection — every restaurant with status (Live / Closed / Off), item count and open count. Duplicate, edit or delete
  • Create / Edit — eight steps: General (name, job, color, logo, enabled, active hours), Ownership, Menu, Recipes, Access, Payments, Stations (plus map blip), Review
  • Admins — super admins can give online players creator rights
  • Settings — server-wide options saved in the database

Stations are placed with a camera bubble: aim, E to place, F to cancel. Garage spawns use a ghost vehicle (scroll to rotate).

UI colors

Everything runs in one tablet UI in html/. Edit the :root block at the top of html/style.css to re-skin it. The customer menu uses each restaurant's themeColor.

Menu providers (developers)

Other resources can add items to a menu without editing this one. Categories whose label matches an existing tab are merged into it. Prices and quantities are validated by the server.

your_resource/server.lua
exports.dh_restaurants:RegisterMenuProvider(GetCurrentResourceName())

exports('GetMenuCategories', function(src, restaurant)
    return { { label = 'House Specials', items = { { item = 'my_key', label = 'Secret Burger', price = 500 } } } }
end)

exports('ReservePurchase', function(src, restaurant, key, qty)
    -- return nil, 'reason' to refuse
    return { item = key, label = 'Secret Burger', price = 500, quantity = qty, grantItem = 'secret_burger', token = someId }
end)

exports('SettlePurchase', function(token, success) end)
SideExportDescription
serverRegisterMenuProvider(resourceName)Register a menu provider
clientIsOnDuty()Local player's duty state
clientGetCurrentJob()Local player's job name