24/7 Supermarket

A script by 4projects.dev

No reviews yet.
24/7 Supermarket main image

Full Description


Config
_4p = {
    Framework = "esx", -- Set your framework here, options: esx, qbcore, custom
    lang = "en",  -- Language of the script
    stores = { -- Add your stores here
        {
            label = "24/7 Supermarket", -- Name of the store
            description = "How can we help you today? Welcome to Los Santos Supermarket! Buy a variety of products", -- Description of the store
            open_time = 0,  -- Opening time
            close_time = 20, -- Closing time
            img = "5.jpg",  -- Image of the store when you are near (html/img/shops-images)
            coords = vector3(1165.9147, 2709.3650, 38.1577), -- Location of the store

            model = "s_f_m_fembarber", --The model name. See above for the URL of the list.
            ped_coords = vector3(1165.9008, 2711.2346, 38.1577 - 1.0), -- Ped coords
            heading = 180.0, --Must be a float value. This means it needs a decimal and a number after the decimal.
            animDict = "rcmjosh1", ----The animation dictionary. Optional. Comment out or delete if not using.
            animName = "idle", --The animation name. Optional. Comment out or delete if not using.
            blip = { -- Blip of the store
                sprite = 52, -- Blip sprite
                display = 4, -- Blip display
                scale = 0.8, -- Blip scale
                color = 2, -- Blip color
            },
            storeTax = 0.1, -- Tax of the store
            products = { -- Products of the store
                item1 = {
                    label = "Water", -- Name of the product
                    description = "A bottle of water", -- Description of the product
                    price = 1, -- Price of the product
                    weight = 1, -- Weight of the product
                    image = "water.png", -- Image of the product
                    number = "2",
                },
            },
        },
    },

}

_4p.helpNotification = function(message) -- function in thread
    -- esx
    Framework.object.ShowHelpNotification(message)
end

_4p.notify = function(message, source)
    if IsDuplicityVersion() then
        if _4p.Framework == "esx" then
            TriggerClientEvent("esx:showNotification", source, message)
        elseif _4p.Framework == "qbcore" then
            TriggerClientEvent("QBCore:Notify", source, message)
        else
            print("^1[4p-supermarket] ^3You are using a custom framework, please add a notification function to the config.lua^7")
        end
    else
        if _4p.Framework == "esx" then
            Framework.object.ShowNotification(message)
        elseif _4p.Framework == "qbcore" then
            Framework.object.Functions.Notify(message)
        else
            print("^1[4p-supermarket] ^3You are using a custom framework, please add a notification function to the config.lua^7")
        end
    end
end

_4p.language = {
    ["en"] = {
        -- UI 
        location = "Location",
        open = "Open",
        closed = "Closed",
        supermarket_title = "Welcome to the",
        products = "Products",
        add_to_cart = "Add to cart",
        your_bill = "Your bill",
        bill_description = "Add items to your cart to see your total bill",
        billing_number = "Billing number",
        address = "Address",
        amount = "Amount",
        tax = "Tax",
        total = "Total",
        pay = "Pay the bill",
        your_wallet = "Your wallet",
        account_balance = "Account balance",
        choose_method = "Choose your payment method",

        -- other 
        store_closed = "The store is currently closed",
        cart_empty = "Your cart is empty",
        not_enough_money = "You don't have enough money",
        success_purchase = "You have successfully purchased the items",
        press_e = "Press ~INPUT_CONTEXT~ to open the supermarket",

    }, 
    ["de"] = {
        -- UI 
        location = "Standort",
        open = "Geöffnet",
        closed = "Geschlossen",
        supermarket_title = "Willkommen bei",
        products = "Produkte",
        add_to_cart = "In den Warenkorb",
        your_bill = "Ihre Rechnung",
        bill_description = "Fügen Sie Artikel zu Ihrem Warenkorb hinzu, um Ihre Gesamtrechnung zu sehen",
        billing_number = "Rechnungsnummer",
        address = "Adresse",
        amount = "Menge",
        tax = "Steuer",
        total = "Gesamt",
        pay = "Bezahlen Sie die Rechnung",
        your_wallet = "Ihr Geldbeutel",
        account_balance = "Kontostand",
        choose_method = "Wählen Sie Ihre Zahlungsmethode",

        -- other 
        store_closed = "Der Laden ist derzeit geschlossen",
        cart_empty = "Ihr Warenkorb ist leer",
        not_enough_money = "Sie haben nicht genug Geld",
        success_purchase = "Sie haben die Artikel erfolgreich gekauft",
        press_e = "Drücken Sie ~INPUT_CONTEXT~, um den Supermarkt zu öffnen",
    }, 
}

If you’re experiencing any issues, don’t worry! We’ve got you covered. Just open a ticket in our Discord, and our team will work hard to assist you.

:hammer_and_wrench: Key Features:

🡂 Change Theme Color
🡂 Sound Effects
🡂 Edit closed & opening time of each supermarket
🡂 Add/Remove/Delete items in cart
🡂 Card / Cash Payment
🡂 Display item weight
🡂 In near notification with background image of each supermarket (20 images premade or add your own)
🡂 Perfect for people who likes simple designs or hosting a survival server




Code is accessible 50%
Subscription-based No
Lines (approximately) 200
Requirements ESX or QB-Core
Support Yes

Config Merger
Have you tried Config Merger? Merge your configs easily