Configuration
General settings are in config/config.lua. Many can also be changed in game on the creator's Settings tab.
Files
| File | What's in it |
|---|---|
| config/config.lua | General settings (below) |
| config/restaurants.lua | Restaurants shipped in a file: menus, recipes, stations, ownership, plus Config.IngredientPickupLocations |
| config/server.lua | Server-only: Discord logging |
| data/ingredients.json | Every ingredient: label, weight, shop price, cutting |
| data/animations.lua | Cooking, station and ped animations |
| locales/en.json | All text |
| client/utils.lua, server/utils.lua | Editable hooks: vehicle keys, wardrobe, progress bar, extra permission checks, sale hook, log sink |
config.lua until you press Reset to config.lua.Main options
| Option | Default | Description |
|---|---|---|
| Interaction | 'textui' | 'target' (falls back to text UI if no target) or 'textui' |
| InteractionDistance | 2.0 | Client interaction distance |
| MaxStationDistance | 5.0 | Server-side max distance for station actions |
| AllowFreeRecipes | true | Creator may make recipes with no ingredients |
| IngredientItems | 'real' | 'carriers' (ox / tgiann / jaksam) or 'real' |
| CookFromStash | true | Cooking can use ingredients from the kitchen stash |
| HandWashing | off | Require hand washing every ValidMinutes |
| RequireDuty | true | Staff 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 / MaxCartLines | 5000 / 3000 | Cart limits |
| ImagePath | 'auto' | Menu image path, or your own like 'nui://qs-inventory/html/images/%s.png' |
| OfflineShop | true | Self-service menu when nobody's on duty |
| ReceiptItem | 'dh_receipt' | Item given on completed kitchen orders ('' = none) |
| InGameCreator | true | Enable /restaurantcreator |
| CustomRecipeItems | {} | Extra items dashboard recipes may produce |
| ShowBlips / DefaultBlip | true / sprite 106 | Map blips and the blip for new creator restaurants |
| CartMarker / MaxCartPoints | ring / 20 | Default counter marker and max counters per restaurant |
Society money
| Mode | Description |
|---|---|
| '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.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:
- 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)
- An on-duty employee goes to the
dropoffstation, presses [E] Ingredient orders and picks one - GPS leads to a supplier from
Config.IngredientPickupLocations. [E] Collect ingredient order loads the box - 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.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.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.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.AnimDurations = {
cutting = 5000, frying = 12000, bbq = 15000, drink = 5000, food = 7000,
iceMachine = 4000, delivery = 3000, pickup = 4000, dropoff = 3000,
}
Discord logs
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.
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)
| Side | Export | Description |
|---|---|---|
| server | RegisterMenuProvider(resourceName) | Register a menu provider |
| client | IsOnDuty() | Local player's duty state |
| client | GetCurrentJob() | Local player's job name |