🔷How To Add New Food Items
Last updated
Last updated
Table of Contents
Configuration Guide
Ingredients
Drinks
Meals
Item Types
Notes
This guide explains how to add new items (ingredients, drinks, and meals) to the st-snrbuns FiveM script by editing the data/config.lua
file.
Ingredients are defined in the Config.ingredients
table:
-- Basic ingredient structure
tomato = {
label = 'Tomato', -- Display name
emoji = '🍅', -- Emoji representation
image = 'image_url', -- URL to ingredient image
default = 250, -- Starting quantity (optional)
show = true/false -- Whether to show in inventory (optional)
}
-- Example configuration
Config.ingredients = {
bacon = {
label = 'Bacon',
emoji = '🥓',
image = 'https://example.com/bacon.png',
default = 100
}
}
Drinks are defined in the Config.drinks
table:
-- Example drink configuration
Config.drinks = {
['sprunk'] = {
label = 'Sprunk',
emoji = '🥤',
image = 'image_url'
}
}
Meals are defined in Config.register.meals
:
-- Example meal configuration
Config.register = {
meals = {
['burger'] = {
order = 1, -- Menu position
label = 'Burger', -- Display name
price = 8.99, -- Price
emoji = '🍔', -- Emoji
image = 'image_url', -- Meal image
ingredients = { -- Required ingredients
['bun'] = {
label = 'Bun',
emoji = '🍞',
amount = 1,
optional = false
}
}
}
}
}
After adding items, register them in Config.items
:
-- Example item type registration
Config.items = {
['sprunk'] = 'st_snr_drink',
['burger'] = 'st_snr_main',
['fries'] = 'st_snr_side',
['box'] = 'st_snr_box'
}
Image URLs should be accessible from the game client
Emojis should be simple and recognizable
Prices should be in USD format (e.g., 8.99)
The default
quantity is how many items spawn when the server restarts