Configuration
Every option in STG Food Stands config/config.lua and config/functions.lua, from rent and the depot to supplies, prices, orders, NPC customers, storage and cooking times.
All settings live in stg-foodstands/config/config.lua, and the hooks for notifications and hunger live in stg-foodstands/config/functions.lua. Both files stay editable in the escrow version, together with the files in client/editable/ and server/editable/. Restart the resource after a change.
Language
Config.Language = 'en'Available: ar, cs, de, en, es, fi, fr, he, it, jp, ko, nl, no, pl, pt, sv, zh. To change a text, edit the matching file in stg-foodstands/locales/. To add a language, copy en.lua, rename the table inside it (for example Locales.tr) and set Config.Language to the new code.
Interaction
Config.Target = 'auto'Prop
Type
Without a target system, the prompts above the stand use these keys:
| Key | Owner | Customer |
|---|---|---|
| E | Cook (or set up the stand when it is hitched) | Order food |
| G | Storage | Pick up order |
| R | Restock the stand | |
| H | Hitch to vehicle | |
| Y | Push the stand | |
| U | Open or close for customers | |
| B | Return the stand (near the depot only) |
The target integration lives in stg-foodstands/client/editable/target.lua if you want to connect another target resource.
Stand ownership
Config.Ownership = {
mode = 'rent',
account = 'bank',
rentDays = 7,
graceDays = 3,
sellRefund = 50,
maxPerPlayer = 1,
offlineReturn = 5,
stands = {
hotdog = { rent = 2500, price = 30000, limit = 3 },
burger = { rent = 3500, price = 40000, limit = 3 },
taco = { rent = 3500, price = 40000, limit = 3 },
},
}Prop
Type
Each entry in stands is one stand type:
Prop
Type
The first rent payment comes from the player's account. After that, rent is paid from the stand register, from the depot menu or from the reminder that shows up shortly before the rent is due and again once it is overdue.
When the grace period runs out, the stand is taken back: its stock, prices, logo, storage and the money left in its register are lost, and open orders are refunded. Ending a rental or selling a stand pays the register out to the owner first, then resets the stand the same way.
Depot
The depot is where players rent or buy a stand, take it out, return it and manage it.
Config.Depot = {
npc = {
model = 'a_m_m_business_01',
coords = vector4(39.0893, -1005.5475, 29.4803, 70.7512),
},
blip = {
enabled = true,
sprite = 93,
color = 47,
scale = 0.8,
},
spawn = {
vector4(37.8764, -1001.9238, 29.4522, 250.0),
},
returnRadius = 15.0,
}Prop
Type
The depot menu has these tabs for each stand the player holds:
| Tab | What it does |
|---|---|
| Stand | Sales today and all time, food served, customers and a chart of the last 7 days. |
| Rent | Time left in the rental period, the grace period and past rent payments. |
| Register | The stand's money, deposit and withdraw, and the latest transactions. |
| Stock | Buy supplies with register money. |
| Prices | The base price and the price of every ingredient. |
| Brand | A logo shown on the stand. |
| New Stand | Rent or buy a stand, with how many of each type are left. |
The logo has to be a direct https link to a png or jpg image. It is shown on the stand to every player. Leave the field empty for the default logo.
Supplies
Owners buy supplies in the Stock tab with money from the register. They arrive as items in the owner's inventory, up to 50 per purchase. The owner then picks Restock the stand at their set up stand to load them in.
Config.Supplies = {
hotdog = {
{ key = 'sausage', item = 'stg_hotdog_sausages', per = 12, price = 30, max = 24, start = 12 },
{ key = 'bun', item = 'stg_hotdog_buns', per = 12, price = 20, max = 24, start = 12 },
{ key = 'toppings', item = 'stg_hotdog_toppings', price = 40, max = 2, start = 1, fills = { relish = 20, onion = 20, kraut = 20, chili = 20 } },
},
burger = {
{ key = 'patty', item = 'stg_burger_patties', per = 12, price = 45, max = 24, start = 12 },
-- ...
},
taco = {
{ key = 'shell', item = 'stg_taco_shells', per = 12, price = 20, max = 24, start = 12 },
-- ...
},
}Each entry is one supply:
Prop
Type
Cooked food needs the base stock: a sausage and a bun for a hot dog, a patty and a bun for a burger, a shell for a taco. Without it, NPC customers stop coming until the owner restocks.
Products
Config.Products = {
hotdog = { item = 'stg_hotdog', price = 15, hunger = 30, thirst = 0 },
burger = { item = 'stg_burger', price = 10, hunger = 45, thirst = 0 },
taco = { item = 'stg_taco', price = 8, hunger = 35, thirst = 0 },
}Prop
Type
Using the item puts the food in the player's hand, and they take a bite with left click. The food in hand is built from the stand's own props exactly as it was made, so a double bacon burger looks like one, and nearby players see the same meal. Owners can also cook without an order and take the food from the display shelf for themselves.
With ox_inventory or qb-inventory the item carries its recipe, so hovering it shows what is inside (for example "Patty x2, Cheddar x5, Bacon x3") and different recipes stack separately. Without one of those inventories, or when the inventory is full, the food goes straight into the player's hand to eat instead.
Price limits
Config.PriceLimits = { min = 1, max = 500 }The range owners can set the base price in. Ingredient prices go from 0 to max. Prices outside the range are pulled back to the nearest limit.
NPC customers check the price before they order. When an order would cost more than 1.5 times what it costs at the default prices, they walk away without ordering.
Player orders
Config.Orders = {
account = 'cash',
timeout = 600,
maxQuantity = 3,
maxOpen = 1,
options = {
hotdog = {
{ key = 'ketchup', max = 1, default = 1, price = 1 },
{ key = 'mustard', max = 1, default = 1, price = 1 },
-- ...
},
burger = {
{ key = 'patty', min = 1, max = 3, default = 1, price = 12 },
{ key = 'cheddar', max = 5, default = 1, price = 2 },
-- ...
},
taco = {
{ key = 'meat', choices = { 'asada', 'pollo', 'chorizo', 'pastor' }, prices = { asada = 7, pollo = 6, chorizo = 7, pastor = 8 } },
{ key = 'onion', max = 1, default = 1, price = 1 },
-- ...
},
},
}Customers order at an open stand and pay up front: the base price plus every ingredient they pick, times the quantity. The order goes on the ticket rail of the cook, and once it is made the customer picks it up at the stand. The money goes into the register at pick up. Owners cannot order from their own stand.
Prop
Type
Each entry in options is one ingredient on the order menu:
Prop
Type
NPC customers
Config.NpcCustomers = {
enabled = true,
startDelay = 5,
interval = { 25, 60 },
maxWaiting = 3,
patience = 180,
}While the owner stands at an open stand that has base stock, NPC customers walk up and queue. Each one places a random order, sometimes for two, at the owner's prices. When the order is served they pay into the register and walk away eating. Leaving the stand sends the queue away.
Prop
Type
Storage
Config.Stash = {
slots = 20,
maxWeight = 50000,
}Every stand has its own storage that only the owner can open, at the set up stand. It works with ox_inventory and qb-inventory, detected automatically. To use another inventory, edit stg-foodstands/server/editable/inventory.lua and stg-foodstands/client/editable/inventory.lua.
Prop
Type
Cooking times
Config.Cooking = {
time = 20,
}
Config.Burger = {
time = 25,
}
Config.Taco = {
time = 20,
trompo = 120,
}Prop
Type
Functions
stg-foodstands/config/functions.lua connects the script to the rest of your server.
Config.Functions.CustomNotify = false
Config.Functions.Notify = function(type, message) ... end
Config.Functions.AddNeeds = function(hunger, thirst) ... end- CustomNotify:
falseshows the script's own toast. Set it totrueto send notifications through thelib.notifycall insideNotify, or replace that call with your own notification system. - AddNeeds: runs on every bite, so a half eaten meal gives part of the value. Works out of the box with
esx_status, thehungerandthirststate bags used by QBOX, and the QBCore player metadata.
Still having trouble?
Open a ticket on our Discord. Our team answers around 15 hours a day.