What Comes in the Package#
Resource | Required | What it does |
|---|---|---|
| No | Shops on the map, job and gang stashes, stock and a restock delivery job. |
| No | Usable armor vests with a visual vest. |
Documentation
The resources bundled with Quasar Inventory: qs-shops with job, gang and licence locks, stock and a restock delivery job, plus the armor, backpacks, licenses, weapon draw and weapons on back add-ons.
Resource | Required | What it does |
|---|---|---|
| No | Shops on the map, job and gang stashes, stock and a restock delivery job. |
| No | Usable armor vests with a visual vest. |
|
No |
Backpacks and briefcases that open their own storage, with optional passwords. |
| No | Counters where players buy their ID card and licences. |
| No | Draw and holster animations. |
| No | Weapons in the inventory shown on the character's body. |
Start every add-on after qs-inventory, and do not rename any of them — each one checks its own folder name.
qs-shops places shops on the map that open in the inventory's shop view: the player drags what they want to buy into their inventory and pays from the shop's account. Shops can be locked to jobs, grades, gangs or licences, can keep a limited stock, and the stock is refilled by players doing delivery runs. On QBCore it replaces qb-shops and stops it automatically.
qs-shops/config.lua:
Option | Default | Description |
|---|---|---|
|
| Same convar as the inventory. |
|
|
|
|
| Hides shops and stashes a player cannot use: no prompt, no blip, no target. |
|
|
|
|
| Console logs and zone drawing. Set both to |
Products are reusable lists that several shops can share:
Config.Products = {
['hardware'] = {
{ name = 'lockpick', price = 200, amount = 50 },
{ name = 'repairkit', price = 250, amount = 50, requiredJob = { 'mechanic', 'police' } },
{ name = 'advancedrepairkit', price = 500, amount = 50, requiredJob = 'mechanic' },
},
['weapons'] = {
{ name = 'weapon_knife', price = 250, amount = 250 },
{ name = 'pistol_ammo', price = 250, amount = 250, requiredLicense = 'weaponlicense' },
{ name = 'weapon_pistol', price = 2500, amount = 5, requiredLicense = 'weaponlicense' },
},
}Field | Description |
|---|---|
| The item and its price ( |
| Starting stock. |
| Metadata given with the item, such as weapon attachments. |
| Only these players see the product. |
| A licence needed to see the product. |
Products a player does not qualify for are simply not shown. If nothing is left, the shop does not open. Shipped lists: normal, liquor, hardware, weedshop, gearshop, leisureshop, weapons, blackmarket, prison, police, ambulance and mechanic.
Config.Locations = {
['247supermarket'] = {
['label'] = '24/7 Supermarket',
['coords'] = vector4(24.47, -1346.62, 29.5, 271.66),
['ped'] = 'mp_m_shopkeep_01',
['scenario'] = 'WORLD_HUMAN_STAND_MOBILE',
['targetIcon'] = 'fas fa-shopping-basket',
['targetLabel'] = 'Open Shop',
['products'] = Config.Products['normal'],
['showblip'] = true,
['blipsprite'] = 52,
['blipscale'] = 0.6,
['blipcolor'] = 0,
['delivery'] = vector4(26.45, -1315.51, 29.62, 0.07),
['useStock'] = true,
['account'] = 'money',
['distance'] = 5.0,
-- ['requiredJob'] = { 'mechanic', 'police' },
-- ['requiredGrade'] = 3,
-- ['requiredGang'] = { 'ballas' },
},
}Field | Description |
|---|---|
key | Unique shop id. |
| Shop and blip name. |
| Where the ped, prompt and blip are. |
| The shopkeeper, or |
| The target option. |
| A list from |
| The map blip. |
| Where the delivery truck unloads for this shop. |
|
|
|
|
| Prompt distance. |
| Who can open the shop. |
The shipped config includes 24/7, LTD, Rob's Liquor, hardware stores, Ammu-Nation, a weed shop, Sea Word, a leisure shop, a prison shop, a black market, and job shops for police, ambulance and mechanics.
With Config.EnableDelivery = true, players can restock shops. At the depot they pay a deposit for a delivery van, drive to a shop, carry boxes from the back of the van to the shop's delivery point, and are paid per stop. Each completed stop refills the stock of that shop when it uses useStock. After the last stop they return the van and get the deposit back.
Option | Default | Description |
|---|---|---|
|
| Deposit for the van. |
|
| Stops per run. |
|
| Paid to the bank per stop. |
|
| A bonus item with a small chance per stop. |
|
| Fuel resource used to fill the van. |
| GO Postal depot | The depot, where the van spawns and where it is returned. |
|
| The van and its cargo doors. |
Config.Stashes = {
[1] = {
['coords'] = vector3(450.67, -978.57, 30.68),
['targetLabel'] = 'Open Stash',
['size'] = { weight = 50000, slots = 15 },
['blip'] = { name = 'Police Stash', coords = vector3(450.67, -978.57, 30.68), sprite = 1, color = 38, size = 0.5 },
['label'] = 'police_stash',
['requiredJobs'] = { 'police' },
['requiredJobsGrades'] = { 2, 3, 4 },
['requiredLicense'] = nil,
['personal'] = false, -- true = one stash per player
['distance'] = 5.0
},
}The stash id is Stash_<label>; with personal = true, each player gets their own copy. Stashes can also be locked to gangs with requiredGangs. On ESX, gangs are not part of the framework; the gang lookup lives in the bridge files under qs-shops/client/custom and qs-shops/server/custom for you to connect to your gang script.
Usable armor and heavyarmor items. Using one plays an animation with a progress bar, gives the armor and puts a vest on the character. /resetarmor takes the vest off and returns the item.
Option | Default | Description |
|---|---|---|
|
| Durations in milliseconds. |
|
| Armor given by each item. |
|
| The command that removes the vest. |
|
| Puts a vest on the character. |
| per gender | Vest drawable and texture for each armor type. |
Add armor and heavyarmor to your items file if they are not there.
Containers you carry. Put a backpack in a hotbar slot and use it to open its own storage; it shows on your back (or in your hand for a briefcase) while it is in the hotbar. Each bag has its own id, so a bag keeps its contents when it is given, sold or dropped. Briefcases can be locked with a password the first time they are used.
Config.Items = {
['backpack'] = {
slots = 10, weight = 100000, locked = false,
cloth = { male = { ['bag'] = { item = 45, texture = 0 } }, female = { ['bag'] = { item = 45, texture = 0 } } },
},
['briefcase'] = {
slots = 3, weight = 5000, locked = true,
prop = { model = 'prop_ld_suitcase_01', animation = { dict = 'missheistdocksprep1hold_cellphone', anim = 'static', bone = 'RightHand',
attaching_position = { x = 0.10, y = 0.0, z = 0.0, x_rotation = 0.0, y_rotation = 280.0, z_rotation = 53.0 } } },
},
}Use either cloth (a bag drawable, recommended for back bags) or prop (an attached object, for hand-held cases) — never both on one item. Shipped bags: backpack, backpack2, briefcase and paramedicbag.
Option | Default | Description |
|---|---|---|
|
|
|
|
| Password prompts: |
|
| Slots that count as "carrying" the bag. |
|
| Password length. |
|
| Logs in F8. Set it to |
/bagpreview <index> [texture] browses bag drawables on your character so you can pick the item number, and /bpdebug prints what the resource sees. Only one bag can be carried at a time (Config.OnePerItem in the inventory), and bags cannot be stored inside stashes.
Counters on the map where players buy their documents. After a confirmation and a progress bar, the price is taken from the bank and the item is given with the character's name, birth date and gender. Using the document shows it to nearby players.
Config.Shops = {
[1] = {
name = 'id_card', -- the item given
text = '[E] - Identity License',
label = 'ID',
type = 'Document',
price = 150,
isjob = false, -- or a job name
timer = 2500,
location = vec3(-545.08, -204.13, 38.22),
blip = { enable = true, name = 'Identity License', sprite = 409, color = 0, scale = 0.7 },
},
}The shipped counters sell id_card, weaponlicense and driver_license. A script can open a purchase directly:
TriggerEvent('qs-licenses:client:Target', {
label = 'License Example', type = 'Weapon license', name = 'id_card', price = 10,
})Plays a draw animation when a weapon is taken out and a holster animation when it is put away, and blocks firing until the animation ends. If the character wears a holster (Config.WeapDraw.variants), pistols are drawn quickly from the hip and the holster drawable swaps between empty and full.
Config.WeapDraw = {
variants = { 130, 122, 3, 6, 8 }, -- drawables that count as a holster
fastDrawWhenOnBody = false, -- quick draw for weapons shown by qs-weaponsonback
weapons = { 'WEAPON_KNIFE', 'WEAPON_NIGHTSTICK', ... }, -- weapons that animate
holsterWeapons = { 'WEAPON_PISTOL', 'WEAPON_COMBATPISTOL', ... },
}Add your add-on weapons to weapons so they animate too.
Long guns in the inventory are shown on the character's back or spine while they are not in hand — with their attachments and tint — and every player sees them. Each weapon has a model, a bone and an offset:
Config.WeaponPositions = {
['weapon_carbinerifle'] = {
model = 'w_ar_carbinerifle',
hash = -2084633992,
bone = 10706, -- 10706 spine, 24816 back
x = 0.0, y = 0.17, z = -0.25,
x_rotation = 0.0, y_rotation = 75.0, z_rotation = 180.0
},
}Seventeen rifles, SMGs and shotguns are configured. Only one model per weapon type is shown. The client export IsWeaponShownOnBody(weaponHash) tells other scripts whether a weapon is currently on the body.