Advanced Supermarket Simulator
1. Database Installation
Import the following SQL into your database to handle store ownership and data persistence.
sql
CREATE TABLE IF NOT EXISTS supermarket_data (
id int(11) NOT NULL AUTO_INCREMENT,
store_id int(11) NOT NULL,
owner varchar(50) DEFAULT NULL,
owner_name varchar(100) DEFAULT NULL,
products longtext DEFAULT '[]',
finance longtext DEFAULT '{"balance":0,"transactions":[]}',
employees longtext DEFAULT '[]',
bills longtext DEFAULT '[]',
promo_data longtext DEFAULT NULL,
upgrades longtext DEFAULT '[]',
purchased tinyint(1) DEFAULT 0,
purchase_date timestamp NULL DEFAULT NULL,
created_at timestamp NOT NULL DEFAULT current_timestamp(),
updated_at timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (id),
UNIQUE KEY store_id (store_id),
KEY owner (owner)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2. Inventory Setup
Step A: Images
Open the install/images folder provided in this pack.
Copy all .png files.
Paste them into your inventory image folder:
- QB-Inventory: qb-inventory/html/images/
- OX_Inventory: ox_inventory/web/images/
Step B: Item Definitions
For QB-Inventory (qb-core/shared/items.lua)
Add these lines to your shared items:
lua
['receipt'] = {['name'] = 'receipt', ['label'] = 'Receipt', ['weight'] = 10, ['type'] = 'item', ['image'] = 'receipt.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = false, ['combinable'] = nil, ['description'] = 'A purchase receipt.'},
['order_list'] = {['name'] = 'order_list', ['label'] = 'Order List', ['weight'] = 50, ['type'] = 'item', ['image'] = 'order_list.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'A list of orders.'},
['shopping_box'] = {['name'] = 'shopping_box', ['label'] = 'Shopping Box', ['weight'] = 500, ['type'] = 'item', ['image'] = 'shopping_box.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'A box containing shopping items.'},
['247idcard'] = {['name'] = '247idcard', ['label'] = '24/7 ID Card', ['weight'] = 20, ['type'] = 'item', ['image'] = '247idcard.png', ['unique'] = true, ['useable'] = false, ['shouldClose'] = false, ['combinable'] = nil, ['description'] = 'An identification card for 24/7 store employees.'},
['cheetos'] = {['name'] = 'cheetos', ['label'] = 'Cheetos', ['weight'] = 100, ['type'] = 'item', ['image'] = 'cheetos.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'Cheesy snacks.'},
['dcaramel'] = {['name'] = 'dcaramel', ['label'] = 'Dairy Caramel', ['weight'] = 100, ['type'] = 'item', ['image'] = 'dcaramel.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'Dairy caramel chocolate.'},
['diam_bar'] = {['name'] = 'diam_bar', ['label'] = 'Diam Bar', ['weight'] = 100, ['type'] = 'item', ['image'] = 'diam_bar.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'Crunchy caramel bar.'},
['doritos'] = {['name'] = 'doritos', ['label'] = 'Doritos', ['weight'] = 100, ['type'] = 'item', ['image'] = 'doritos.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'Nacho chips.'},
['mccoys'] = {['name'] = 'mccoys', ['label'] = 'McCoys', ['weight'] = 100, ['type'] = 'item', ['image'] = 'mccoys.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'Ridged chips.'},
['milkybar'] = {['name'] = 'milkybar', ['label'] = 'Milkybar', ['weight'] = 100, ['type'] = 'item', ['image'] = 'milkybar.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'White chocolate.'},
['milkybuttons'] = {['name'] = 'milkybuttons', ['label'] = 'Milky Buttons', ['weight'] = 100, ['type'] = 'item', ['image'] = 'milkybuttons.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'White chocolate buttons.'},
['milkyway'] = {['name'] = 'milkyway', ['label'] = 'Milkyway', ['weight'] = 100, ['type'] = 'item', ['image'] = 'milkyway.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'Whipped chocolate bar.'},
['minieggs'] = {['name'] = 'minieggs', ['label'] = 'Mini Eggs', ['weight'] = 100, ['type'] = 'item', ['image'] = 'minieggs.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'Small chocolate eggs.'},
['quarter_pounder'] = {['name'] = 'quarter_pounder', ['label'] = 'Quarter Pounder', ['weight'] = 100, ['type'] = 'item', ['image'] = 'quarter_pounder.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'A classic burger.'},
['quavers'] = {['name'] = 'quavers', ['label'] = 'Quavers', ['weight'] = 100, ['type'] = 'item', ['image'] = 'quavers.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'Cheese snacks.'},
['ripple'] = {['name'] = 'ripple', ['label'] = 'Ripple', ['weight'] = 100, ['type'] = 'item', ['image'] = 'ripple.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'Ripple chocolate.'},
['sensations'] = {['name'] = 'sensations', ['label'] = 'Sensations', ['weight'] = 100, ['type'] = 'item', ['image'] = 'sensations.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'Thai Sweet Chilli chips.'},
['squares'] = {['name'] = 'squares', ['label'] = 'Squares', ['weight'] = 100, ['type'] = 'item', ['image'] = 'squares.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'Salt and vinegar squares.'},
['twirl'] = {['name'] = 'twirl', ['label'] = 'Twirl', ['weight'] = 100, ['type'] = 'item', ['image'] = 'twirl.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'Chocolate twirl.'},
['twix'] = {['name'] = 'twix', ['label'] = 'Twix', ['weight'] = 100, ['type'] = 'item', ['image'] = 'twix.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'Caramel biscuit bar.'},
['yorkie'] = {['name'] = 'yorkie', ['label'] = 'Yorkie', ['weight'] = 100, ['type'] = 'item', ['image'] = 'yorkie.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'Chunky chocolate.'},
For OX_Inventory (ox_inventory/data/items.lua)
Add these lines to your items list:
lua
['receipt'] = { label = 'Receipt', weight = 10, stack = true, close = false, description = 'A purchase receipt.' },
['order_list'] = { label = 'Order List', weight = 50, stack = true, close = true, description = 'A list of orders.' },
['shopping_box'] = { label = 'Shopping Box', weight = 500, stack = false, close = true, description = 'A box containing shopping items.' },
['247idcard'] = { label = '24/7 ID Card', weight = 20, stack = false, close = false, description = 'An identification card for 24/7 store employees.' },
-- Food and Snacks
['cheetos'] = { label = 'Cheetos', weight = 220, client = { status = { hunger = 200000 }, anim = 'eating', prop = 'burger', usetime = 2500, notification = 'You ate delicious cheetos' } },
['dcaramel'] = { label = 'Dairy Caramel', weight = 220, client = { status = { hunger = 200000 }, anim = 'eating', prop = 'burger', usetime = 2500, notification = 'You ate delicious dcaramel' } },
['diam_bar'] = { label = 'Diam Bar', weight = 220, client = { status = { hunger = 200000 }, anim = 'eating', prop = 'burger', usetime = 2500, notification = 'You ate delicious diambar' } },
['doritos'] = { label = 'Doritos', weight = 220, client = { status = { hunger = 200000 }, anim = 'eating', prop = 'burger', usetime = 2500, notification = 'You ate delicious doritos' } },
['mccoys'] = { label = 'McCoys', weight = 220, client = { status = { hunger = 200000 }, anim = 'eating', prop = 'burger', usetime = 2500, notification = 'You ate delicious mccoys' } },
['milkybar'] = { label = 'Milkybar', weight = 220, client = { status = { hunger = 200000 }, anim = 'eating', prop = 'burger', usetime = 2500, notification = 'You ate delicious milkybar' } },
['milkybuttons'] = { label = 'Milky Buttons', weight = 220, client = { status = { hunger = 200000 }, anim = 'eating', prop = 'burger', usetime = 2500, notification = 'You ate delicious milkybuttons' } },
['milkyway'] = { label = 'Milkyway', weight = 220, client = { status = { hunger = 200000 }, anim = 'eating', prop = 'burger', usetime = 2500, notification = 'You ate delicious milkyway' } },
['minieggs'] = { label = 'Mini Eggs', weight = 220, client = { status = { hunger = 200000 }, anim = 'eating', prop = 'burger', usetime = 2500, notification = 'You ate delicious minieggs' } },
['quarter_pounder'] = { label = 'Quarter Pounder', weight = 220, client = { status = { hunger = 200000 }, anim = 'eating', prop = 'burger', usetime = 2500, notification = 'You ate delicious quarterpounder' } },
['quavers'] = { label = 'Quavers', weight = 220, client = { status = { hunger = 200000 }, anim = 'eating', prop = 'burger', usetime = 2500, notification = 'You ate delicious quavers' } },
['ripple'] = { label = 'Ripple', weight = 220, client = { status = { hunger = 200000 }, anim = 'eating', prop = 'burger', usetime = 2500, notification = 'You ate delicious ripple' } },
['sensations'] = { label = 'Sensations', weight = 220, client = { status = { hunger = 200000 }, anim = 'eating', prop = 'burger', usetime = 2500, notification = 'You ate delicious sensations' } },
['squares'] = { label = 'Squares', weight = 220, client = { status = { hunger = 200000 }, anim = 'eating', prop = 'burger', usetime = 2500, notification = 'You ate delicious squares' } },
['twix'] = { label = 'Twix', weight = 220, client = { status = { hunger = 200000 }, anim = 'eating', prop = 'burger', usetime = 2500, notification = 'You ate delicious twix' } },
['twirl'] = { label = 'Twirl', weight = 220, client = { status = { hunger = 200000 }, anim = 'eating', prop = 'burger', usetime = 2500, notification = 'You ate delicious twirl' } },
['yorkie'] = { label = 'Yorkie', weight = 220, client = { status = { hunger = 200000 }, anim = 'eating', prop = 'burger', usetime = 2500, notification = 'You ate delicious yorkie' } },