πŸ”·How To Add New Food Items

Table of Contents

  • Configuration Guide

    • Ingredients

    • Drinks

    • Meals

    • Item Types

  • Notes

Configuration Guide

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

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

Drinks are defined in the Config.drinks table:

Meals

Meals are defined in Config.register.meals:

Item Types

After adding items, register them in Config.items:

Notes

  • 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

Last updated