STG ScriptsDocumentation
Vanaheim Market

Installation

Install STG Vanaheim Market on your FiveM server, add the product items to your inventory and start it.

Vanaheim Market

STG Vanaheim Market

ESXQBCoreQBOX
View in store

Download the script

Sign in to the Cfx.re portal with the account you used at checkout and download stg-vanaheimmarket from Granted Assets.

Move the resource

Extract the zip and place the stg-vanaheimmarket folder inside the [STG] category folder in your resources directory.

resources/
└── [STG]/
    ├── stg_lib/
    └── stg-vanaheimmarket/

Install the dependencies

Vanaheim Market needs ox_lib, oxmysql and stg_lib. Skip this step if your server already runs them. The database tables are created on the first start.

Add the items

Every product in stg-vanaheimmarket/shared/products.lua is an inventory item, 37 in total. Many servers already have some of them, such as water or sandwich, so skip the ones you already have. QBOX servers, and any ESX or QBCore server running ox_inventory, use the ox_inventory tab.

Add these entries to ox_inventory/data/items.lua. Food and drinks restore hunger and thirst when used:

['water'] = {
    label = 'Water',
    weight = 350,
    client = {
        status = { thirst = 200000 },
        anim = { dict = 'mp_player_intdrink', clip = 'loop_bottle' },
        prop = { model = `prop_ld_flow_bottle`, pos = vec3(0.01, 0.0, -0.07), rot = vec3(0.0, 0.0, 0.0) },
        usetime = 2500,
    },
},

['sprunk'] = {
    label = 'Sprunk',
    weight = 350,
    client = {
        status = { thirst = 200000 },
        anim = { dict = 'mp_player_intdrink', clip = 'loop_bottle' },
        prop = { model = `prop_ld_can_01`, pos = vec3(0.01, 0.0, -0.07), rot = vec3(0.0, 0.0, 0.0) },
        usetime = 2500,
    },
},

['ecola'] = {
    label = 'eCola',
    weight = 350,
    client = {
        status = { thirst = 200000 },
        anim = { dict = 'mp_player_intdrink', clip = 'loop_bottle' },
        prop = { model = `prop_ecola_can`, pos = vec3(0.01, 0.0, -0.07), rot = vec3(0.0, 0.0, 0.0) },
        usetime = 2500,
    },
},

['orangotang'] = {
    label = 'Orang-O-Tang',
    weight = 350,
    client = {
        status = { thirst = 200000 },
        anim = { dict = 'mp_player_intdrink', clip = 'loop_bottle' },
        prop = { model = `prop_orang_can_01`, pos = vec3(0.01, 0.0, -0.07), rot = vec3(0.0, 0.0, 0.0) },
        usetime = 2500,
    },
},

['energy_drink'] = {
    label = 'Energy Drink',
    weight = 350,
    client = {
        status = { thirst = 200000 },
        anim = { dict = 'mp_player_intdrink', clip = 'loop_bottle' },
        prop = { model = `prop_energy_drink`, pos = vec3(0.01, 0.0, -0.07), rot = vec3(0.0, 0.0, 0.0) },
        usetime = 2500,
    },
},

['coffee'] = {
    label = 'Coffee',
    weight = 350,
    client = {
        status = { thirst = 200000 },
        anim = { dict = 'mp_player_intdrink', clip = 'loop_bottle' },
        prop = { model = `p_amb_coffeecup_01`, pos = vec3(0.01, 0.0, -0.07), rot = vec3(0.0, 0.0, 0.0) },
        usetime = 2500,
    },
},

['milk'] = {
    label = 'Milk',
    weight = 350,
    client = {
        status = { thirst = 200000 },
        anim = { dict = 'mp_player_intdrink', clip = 'loop_bottle' },
        prop = { model = `prop_cs_milk_01`, pos = vec3(0.01, 0.0, -0.07), rot = vec3(0.0, 0.0, 0.0) },
        usetime = 2500,
    },
},

['beer'] = {
    label = 'Beer',
    weight = 750,
    client = {
        status = { thirst = 100000 },
        anim = { dict = 'mp_player_intdrink', clip = 'loop_bottle' },
        prop = { model = `prop_amb_beer_bottle`, pos = vec3(0.01, 0.0, -0.07), rot = vec3(0.0, 0.0, 0.0) },
        usetime = 2500,
    },
},

['wine'] = {
    label = 'Wine',
    weight = 750,
    client = {
        status = { thirst = 100000 },
        anim = { dict = 'mp_player_intdrink', clip = 'loop_bottle' },
        prop = { model = `prop_wine_bot_01`, pos = vec3(0.01, 0.0, -0.07), rot = vec3(0.0, 0.0, 0.0) },
        usetime = 2500,
    },
},

['vodka'] = {
    label = 'Vodka',
    weight = 750,
    client = {
        status = { thirst = 100000 },
        anim = { dict = 'mp_player_intdrink', clip = 'loop_bottle' },
        prop = { model = `prop_vodka_bottle`, pos = vec3(0.01, 0.0, -0.07), rot = vec3(0.0, 0.0, 0.0) },
        usetime = 2500,
    },
},

['whiskey'] = {
    label = 'Whiskey',
    weight = 750,
    client = {
        status = { thirst = 100000 },
        anim = { dict = 'mp_player_intdrink', clip = 'loop_bottle' },
        prop = { model = `p_whiskey_bottle_s`, pos = vec3(0.01, 0.0, -0.07), rot = vec3(0.0, 0.0, 0.0) },
        usetime = 2500,
    },
},

['tequila'] = {
    label = 'Tequila',
    weight = 750,
    client = {
        status = { thirst = 100000 },
        anim = { dict = 'mp_player_intdrink', clip = 'loop_bottle' },
        prop = { model = `prop_tequila_bottle`, pos = vec3(0.01, 0.0, -0.07), rot = vec3(0.0, 0.0, 0.0) },
        usetime = 2500,
    },
},

['burger'] = {
    label = 'Burger',
    weight = 250,
    client = {
        status = { hunger = 150000 },
        anim = 'eating',
        prop = { model = `prop_cs_burger_01`, pos = vec3(0.02, 0.02, -0.02), rot = vec3(0.0, 0.0, 0.0) },
        usetime = 2500,
    },
},

['sandwich'] = {
    label = 'Sandwich',
    weight = 250,
    client = {
        status = { hunger = 150000 },
        anim = 'eating',
        prop = { model = `stg_sandwich`, pos = vec3(0.02, 0.02, -0.02), rot = vec3(0.0, 0.0, 0.0) },
        usetime = 2500,
    },
},

['hotdog'] = {
    label = 'Hot Dog',
    weight = 250,
    client = {
        status = { hunger = 150000 },
        anim = 'eating',
        prop = { model = `prop_cs_hotdog_01`, pos = vec3(0.02, 0.02, -0.02), rot = vec3(0.0, 0.0, 0.0) },
        usetime = 2500,
    },
},

['taco'] = {
    label = 'Taco',
    weight = 250,
    client = {
        status = { hunger = 150000 },
        anim = 'eating',
        prop = { model = `prop_taco_01`, pos = vec3(0.02, 0.02, -0.02), rot = vec3(0.0, 0.0, 0.0) },
        usetime = 2500,
    },
},

['donut'] = {
    label = 'Donut',
    weight = 250,
    client = {
        status = { hunger = 150000 },
        anim = 'eating',
        prop = { model = `prop_donut_02`, pos = vec3(0.02, 0.02, -0.02), rot = vec3(0.0, 0.0, 0.0) },
        usetime = 2500,
    },
},

['chips'] = {
    label = 'Chips',
    weight = 100,
    client = {
        status = { hunger = 150000 },
        anim = 'eating',
        prop = { model = `prop_cs_crisps_01`, pos = vec3(0.02, 0.02, -0.02), rot = vec3(0.0, 0.0, 0.0) },
        usetime = 2500,
    },
},

['egochaser'] = {
    label = 'Ego Chaser',
    weight = 100,
    client = {
        status = { hunger = 150000 },
        anim = 'eating',
        prop = { model = `prop_choc_ego`, pos = vec3(0.02, 0.02, -0.02), rot = vec3(0.0, 0.0, 0.0) },
        usetime = 2500,
    },
},

['meteorite'] = {
    label = 'Meteorite',
    weight = 100,
    client = {
        status = { hunger = 150000 },
        anim = 'eating',
        prop = { model = `prop_choc_meto`, pos = vec3(0.02, 0.02, -0.02), rot = vec3(0.0, 0.0, 0.0) },
        usetime = 2500,
    },
},

['psqs'] = {
    label = 'P\'s & Q\'s',
    weight = 100,
    client = {
        status = { hunger = 150000 },
        anim = 'eating',
        prop = { model = `prop_choc_pq`, pos = vec3(0.02, 0.02, -0.02), rot = vec3(0.0, 0.0, 0.0) },
        usetime = 2500,
    },
},

['bread'] = {
    label = 'Bread',
    weight = 300,
    client = {
        status = { hunger = 150000 },
        anim = 'eating',
        prop = { model = `v_res_fa_bread01`, pos = vec3(0.02, 0.02, -0.02), rot = vec3(0.0, 0.0, 0.0) },
        usetime = 2500,
    },
},

['cereal'] = {
    label = 'Cereal',
    weight = 300,
    client = {
        status = { hunger = 150000 },
        anim = 'eating',
        prop = { model = `v_res_tt_cereal01`, pos = vec3(0.02, 0.02, -0.02), rot = vec3(0.0, 0.0, 0.0) },
        usetime = 2500,
    },
},

['noodles'] = {
    label = 'Pot Noodles',
    weight = 300,
    client = {
        status = { hunger = 150000 },
        anim = 'eating',
        prop = { model = `v_res_fa_potnoodle`, pos = vec3(0.02, 0.02, -0.02), rot = vec3(0.0, 0.0, 0.0) },
        usetime = 2500,
    },
},

['tomato_soup'] = {
    label = 'Tomato Soup',
    weight = 300,
    client = {
        status = { hunger = 150000 },
        anim = 'eating',
        prop = { model = `v_res_fa_tintomsoup`, pos = vec3(0.02, 0.02, -0.02), rot = vec3(0.0, 0.0, 0.0) },
        usetime = 2500,
    },
},

['canned_corn'] = {
    label = 'Canned Corn',
    weight = 300,
    client = {
        status = { hunger = 150000 },
        anim = 'eating',
        prop = { model = `v_res_fa_tincorn`, pos = vec3(0.02, 0.02, -0.02), rot = vec3(0.0, 0.0, 0.0) },
        usetime = 2500,
    },
},

['eggs'] = {
    label = 'Eggs',
    weight = 300,
    client = {
        status = { hunger = 150000 },
        anim = 'eating',
        prop = { model = `v_ret_247_eggs`, pos = vec3(0.02, 0.02, -0.02), rot = vec3(0.0, 0.0, 0.0) },
        usetime = 2500,
    },
},

['orange'] = {
    label = 'Orange',
    weight = 300,
    client = {
        status = { hunger = 150000 },
        anim = 'eating',
        prop = { model = `ng_proc_food_ornge1a`, pos = vec3(0.02, 0.02, -0.02), rot = vec3(0.0, 0.0, 0.0) },
        usetime = 2500,
    },
},

['mustard'] = {
    label = 'Mustard',
    weight = 300,
    client = {
        status = { hunger = 150000 },
        anim = 'eating',
        prop = { model = `prop_food_mustard`, pos = vec3(0.02, 0.02, -0.02), rot = vec3(0.0, 0.0, 0.0) },
        usetime = 2500,
    },
},

['ketchup'] = {
    label = 'Ketchup',
    weight = 300,
    client = {
        status = { hunger = 150000 },
        anim = 'eating',
        prop = { model = `v_res_fa_ketchup`, pos = vec3(0.02, 0.02, -0.02), rot = vec3(0.0, 0.0, 0.0) },
        usetime = 2500,
    },
},

['firstaid'] = {
    label = 'First Aid Kit',
    weight = 200,
},

['painkillers'] = {
    label = 'Painkillers',
    weight = 200,
},

['toothpaste'] = {
    label = 'Toothpaste',
    weight = 200,
},

['toilet_paper'] = {
    label = 'Toilet Paper',
    weight = 200,
},

['lighter'] = {
    label = 'Lighter',
    weight = 50,
},

['rolling_paper'] = {
    label = 'Rolling Paper',
    weight = 50,
},

['cigarettes'] = {
    label = 'Cigarettes',
    weight = 50,
},

Add these lines to QBShared.Items in qb-core/shared/items.lua. Food and drinks are useable, hook them to your consumables script (for example qb-smallresources) to restore hunger and thirst:

['water'] = { name = 'water', label = 'Water', weight = 350, type = 'item', image = 'water.png', unique = false, useable = true, shouldClose = true, description = '' },
['sprunk'] = { name = 'sprunk', label = 'Sprunk', weight = 350, type = 'item', image = 'sprunk.png', unique = false, useable = true, shouldClose = true, description = '' },
['ecola'] = { name = 'ecola', label = 'eCola', weight = 350, type = 'item', image = 'ecola.png', unique = false, useable = true, shouldClose = true, description = '' },
['orangotang'] = { name = 'orangotang', label = 'Orang-O-Tang', weight = 350, type = 'item', image = 'orangotang.png', unique = false, useable = true, shouldClose = true, description = '' },
['energy_drink'] = { name = 'energy_drink', label = 'Energy Drink', weight = 350, type = 'item', image = 'energy_drink.png', unique = false, useable = true, shouldClose = true, description = '' },
['coffee'] = { name = 'coffee', label = 'Coffee', weight = 350, type = 'item', image = 'coffee.png', unique = false, useable = true, shouldClose = true, description = '' },
['milk'] = { name = 'milk', label = 'Milk', weight = 350, type = 'item', image = 'milk.png', unique = false, useable = true, shouldClose = true, description = '' },
['beer'] = { name = 'beer', label = 'Beer', weight = 750, type = 'item', image = 'beer.png', unique = false, useable = true, shouldClose = true, description = '' },
['wine'] = { name = 'wine', label = 'Wine', weight = 750, type = 'item', image = 'wine.png', unique = false, useable = true, shouldClose = true, description = '' },
['vodka'] = { name = 'vodka', label = 'Vodka', weight = 750, type = 'item', image = 'vodka.png', unique = false, useable = true, shouldClose = true, description = '' },
['whiskey'] = { name = 'whiskey', label = 'Whiskey', weight = 750, type = 'item', image = 'whiskey.png', unique = false, useable = true, shouldClose = true, description = '' },
['tequila'] = { name = 'tequila', label = 'Tequila', weight = 750, type = 'item', image = 'tequila.png', unique = false, useable = true, shouldClose = true, description = '' },
['burger'] = { name = 'burger', label = 'Burger', weight = 250, type = 'item', image = 'burger.png', unique = false, useable = true, shouldClose = true, description = '' },
['sandwich'] = { name = 'sandwich', label = 'Sandwich', weight = 250, type = 'item', image = 'sandwich.png', unique = false, useable = true, shouldClose = true, description = '' },
['hotdog'] = { name = 'hotdog', label = 'Hot Dog', weight = 250, type = 'item', image = 'hotdog.png', unique = false, useable = true, shouldClose = true, description = '' },
['taco'] = { name = 'taco', label = 'Taco', weight = 250, type = 'item', image = 'taco.png', unique = false, useable = true, shouldClose = true, description = '' },
['donut'] = { name = 'donut', label = 'Donut', weight = 250, type = 'item', image = 'donut.png', unique = false, useable = true, shouldClose = true, description = '' },
['chips'] = { name = 'chips', label = 'Chips', weight = 100, type = 'item', image = 'chips.png', unique = false, useable = true, shouldClose = true, description = '' },
['egochaser'] = { name = 'egochaser', label = 'Ego Chaser', weight = 100, type = 'item', image = 'egochaser.png', unique = false, useable = true, shouldClose = true, description = '' },
['meteorite'] = { name = 'meteorite', label = 'Meteorite', weight = 100, type = 'item', image = 'meteorite.png', unique = false, useable = true, shouldClose = true, description = '' },
['psqs'] = { name = 'psqs', label = 'P\'s & Q\'s', weight = 100, type = 'item', image = 'psqs.png', unique = false, useable = true, shouldClose = true, description = '' },
['bread'] = { name = 'bread', label = 'Bread', weight = 300, type = 'item', image = 'bread.png', unique = false, useable = true, shouldClose = true, description = '' },
['cereal'] = { name = 'cereal', label = 'Cereal', weight = 300, type = 'item', image = 'cereal.png', unique = false, useable = true, shouldClose = true, description = '' },
['noodles'] = { name = 'noodles', label = 'Pot Noodles', weight = 300, type = 'item', image = 'noodles.png', unique = false, useable = true, shouldClose = true, description = '' },
['tomato_soup'] = { name = 'tomato_soup', label = 'Tomato Soup', weight = 300, type = 'item', image = 'tomato_soup.png', unique = false, useable = true, shouldClose = true, description = '' },
['canned_corn'] = { name = 'canned_corn', label = 'Canned Corn', weight = 300, type = 'item', image = 'canned_corn.png', unique = false, useable = true, shouldClose = true, description = '' },
['eggs'] = { name = 'eggs', label = 'Eggs', weight = 300, type = 'item', image = 'eggs.png', unique = false, useable = true, shouldClose = true, description = '' },
['orange'] = { name = 'orange', label = 'Orange', weight = 300, type = 'item', image = 'orange.png', unique = false, useable = true, shouldClose = true, description = '' },
['mustard'] = { name = 'mustard', label = 'Mustard', weight = 300, type = 'item', image = 'mustard.png', unique = false, useable = true, shouldClose = true, description = '' },
['ketchup'] = { name = 'ketchup', label = 'Ketchup', weight = 300, type = 'item', image = 'ketchup.png', unique = false, useable = true, shouldClose = true, description = '' },
['firstaid'] = { name = 'firstaid', label = 'First Aid Kit', weight = 200, type = 'item', image = 'firstaid.png', unique = false, useable = false, shouldClose = true, description = '' },
['painkillers'] = { name = 'painkillers', label = 'Painkillers', weight = 200, type = 'item', image = 'painkillers.png', unique = false, useable = false, shouldClose = true, description = '' },
['toothpaste'] = { name = 'toothpaste', label = 'Toothpaste', weight = 200, type = 'item', image = 'toothpaste.png', unique = false, useable = false, shouldClose = true, description = '' },
['toilet_paper'] = { name = 'toilet_paper', label = 'Toilet Paper', weight = 200, type = 'item', image = 'toilet_paper.png', unique = false, useable = false, shouldClose = true, description = '' },
['lighter'] = { name = 'lighter', label = 'Lighter', weight = 50, type = 'item', image = 'lighter.png', unique = false, useable = false, shouldClose = true, description = '' },
['rolling_paper'] = { name = 'rolling_paper', label = 'Rolling Paper', weight = 50, type = 'item', image = 'rolling_paper.png', unique = false, useable = false, shouldClose = true, description = '' },
['cigarettes'] = { name = 'cigarettes', label = 'Cigarettes', weight = 50, type = 'item', image = 'cigarettes.png', unique = false, useable = false, shouldClose = true, description = '' },

Run this query on your database:

INSERT IGNORE INTO `items` (`name`, `label`, `weight`) VALUES
    ('water', 'Water', 3),
    ('sprunk', 'Sprunk', 3),
    ('ecola', 'eCola', 3),
    ('orangotang', 'Orang-O-Tang', 3),
    ('energy_drink', 'Energy Drink', 3),
    ('coffee', 'Coffee', 3),
    ('milk', 'Milk', 3),
    ('beer', 'Beer', 7),
    ('wine', 'Wine', 7),
    ('vodka', 'Vodka', 7),
    ('whiskey', 'Whiskey', 7),
    ('tequila', 'Tequila', 7),
    ('burger', 'Burger', 2),
    ('sandwich', 'Sandwich', 2),
    ('hotdog', 'Hot Dog', 2),
    ('taco', 'Taco', 2),
    ('donut', 'Donut', 2),
    ('chips', 'Chips', 1),
    ('egochaser', 'Ego Chaser', 1),
    ('meteorite', 'Meteorite', 1),
    ('psqs', 'P''s & Q''s', 1),
    ('bread', 'Bread', 3),
    ('cereal', 'Cereal', 3),
    ('noodles', 'Pot Noodles', 3),
    ('tomato_soup', 'Tomato Soup', 3),
    ('canned_corn', 'Canned Corn', 3),
    ('eggs', 'Eggs', 3),
    ('orange', 'Orange', 3),
    ('mustard', 'Mustard', 3),
    ('ketchup', 'Ketchup', 3),
    ('firstaid', 'First Aid Kit', 2),
    ('painkillers', 'Painkillers', 2),
    ('toothpaste', 'Toothpaste', 2),
    ('toilet_paper', 'Toilet Paper', 2),
    ('lighter', 'Lighter', 1),
    ('rolling_paper', 'Rolling Paper', 1),
    ('cigarettes', 'Cigarettes', 1);

Add the item images

Copy every image from stg-vanaheimmarket/[SETUP]/item-images into your inventory's image folder, for example ox_inventory/web/images or qb-inventory/html/images.

Start the script

Make sure [STG] starts after your framework, your inventory, oxmysql and ox_lib in server.cfg:

ensure oxmysql
ensure ox_lib
# your framework: es_extended, qb-core or qbx_core
# your inventory, for example ox_inventory
ensure stg_lib
ensure [STG]

Then restart the whole server.

The stream/ folder replaces the 24/7 and LTD interior assets, so the stores start empty and owners can furnish them. If your server runs a 24/7 or LTD MLO, or another resource that replaces these interiors, the two conflict. Keep only one of them.

Nothing happens or the console shows an error? See Common Errors.

Next steps

Still having trouble?

Open a ticket on our Discord. Our team answers around 15 hours a day.

Get help on Discord

On this page