fix(qb-core): add global CreateUsableItem alias for qs-inventory compatibility
qs-inventory apelează CreateUsableItem ca funcție globală, dar qb-core definea doar QBCore.Functions.CreateUseableItem (cu 'e'). Adăugat alias global + fix 16 stringuri sparte în items.lua care blocau parsarea.
This commit is contained in:
@@ -0,0 +1,515 @@
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Quasar Store · Configuration Guidelines
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- This configuration file defines all adjustable parameters for the script.
|
||||
-- Comments are standardized to help you identify which sections you can safely edit.
|
||||
--
|
||||
-- • [EDIT] – Safe for users to modify. Adjust these values as needed.
|
||||
-- • [INFO] – Informational note describing what the variable or block does.
|
||||
-- • [ADV] – Advanced settings. Change only if you understand the logic behind it.
|
||||
-- • [CORE] – Core functionality. Do not modify unless you are a developer.
|
||||
-- • [AUTO] – Automatically handled by the system. Never edit manually.
|
||||
--
|
||||
-- Always make a backup before editing configuration files.
|
||||
-- Incorrect changes in [CORE] or [AUTO] sections can break the resource.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
---@generic T
|
||||
---@param data {[string]: string}
|
||||
---@return string | false
|
||||
local function DependencyCheck(data) -- [CORE] Detects the first started dependency and returns its alias.
|
||||
for k, v in pairs(data) do
|
||||
if GetResourceState(k):find('started') ~= nil then
|
||||
return v
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
Config = Config or {} -- [CORE] Main configuration table.
|
||||
Locales = Locales or {} -- [CORE] Language packs container.
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Language Selection [EDIT]
|
||||
-- [INFO] Choose your preferred language in locales/* or add your own.
|
||||
-- Available:
|
||||
-- 'ar','bg','ca','cs','da','de','el','en','es','fa','fr','hi','hu','it','ja',
|
||||
-- 'ko','nl','no','pl','pt','ro','ru','sl','sv','th','tr','zh-CN','zh-TW'
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.Language = 'en' -- [EDIT]
|
||||
|
||||
--[[ [INFO]
|
||||
Choose your preferred language!
|
||||
|
||||
In this section, you can select the main language for your asset. We have a wide
|
||||
selection of default languages available, located in the locales/* folder.
|
||||
|
||||
If your language is not listed, you can create a new one by adding a file
|
||||
in locales and customizing it to your needs.
|
||||
]]
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Framework Detection & Configuration (Inventory) [AUTO]
|
||||
-- [INFO] Auto-detects qb-core / es_extended / qbx_core. If you renamed them,
|
||||
-- set adapters or assign manually. Avoid edits unless you know the framework.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
local frameworks = { -- [CORE] Resource name → internal alias
|
||||
['es_extended'] = 'esx',
|
||||
['qb-core'] = 'qb',
|
||||
['qbx_core'] = 'qb'
|
||||
}
|
||||
Config.Framework = DependencyCheck(frameworks) or 'none' -- [AUTO]
|
||||
|
||||
local qbxHas = GetResourceState('qbx_core') == 'started' -- [AUTO]
|
||||
Config.QBX = qbxHas -- [AUTO]
|
||||
|
||||
--[[ [INFO]
|
||||
Manual setup (only if necessary):
|
||||
1) Clear Config.Framework auto-detection and set your custom alias.
|
||||
2) Update framework-specific calls in client/server where required.
|
||||
Warning: Wrong edits here can break core functionality.
|
||||
]]
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Security [EDIT]
|
||||
-- [INFO] Disables client-side shop generation via `inventory:server:OpenInventory`.
|
||||
-- If enabled, you must use the provided server exports/events to create & open shops.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.DisableShopGenerationOnClient = false -- [EDIT] true = client shop-gen disabled
|
||||
|
||||
-- [INFO] Safe APIs to use when disabling client shop-gen:
|
||||
-- Server exports: CreateShop, OpenShop
|
||||
-- Server event: inventory:openShop
|
||||
-- Example (client): TriggerServerEvent('inventory:openShop', 'shop_name')
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Backward Compatibility (qs-inventory Migration) [EDIT]
|
||||
-- [INFO] One-time migration from older qs-inventory data. Set true ONCE.
|
||||
-- After completion (console shows 'Backward compatibility has been completed'),
|
||||
-- immediately set back to false. Do NOT change other settings during migration.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.FetchOldInventory = false -- [EDIT] Use true once for migration, then false.
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Targeting [EDIT]
|
||||
-- [INFO] Enable qb-target / ox_target. If false, targeting is disabled.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.UseTarget = true -- [EDIT]
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- General Inventory Settings [EDIT]
|
||||
-- [INFO] Core behavior for interactions, UI and safety features.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.ThrowKeybind = 'E' -- [EDIT] Key to throw items; false to disable.
|
||||
Config.PoliceCanSeeSixthSlot = true -- [EDIT] Police can see protected 6th slot.
|
||||
Config.PoliceJobs = { 'police', 'sheriff' } -- [EDIT] Jobs treated as police.
|
||||
Config.BlockedSlot = true -- [EDIT] Lock 6th slot to prevent stealing.
|
||||
Config.GiveItemHideName = false -- [EDIT] Hide item names on give; show only ID.
|
||||
Config.OpenProgressBar = false -- [EDIT] Show progress bar on open (dup-prevention).
|
||||
Config.EnableSounds = true -- [EDIT] Toggle default inventory sounds.
|
||||
Config.EnableThrow = true -- [EDIT] Allow throwing items.
|
||||
Config.UseJonskaItemThrow = false -- [EDIT] Use custom throw (see custom/misc/jonska.lua).
|
||||
Config.EnableTrade = true -- [EDIT] Safe MMORPG-style trade.
|
||||
Config.EnableChangeLabel = true -- [EDIT] One-click rename items.
|
||||
|
||||
Config.Handsup = true -- [EDIT] Enable hands-up & robbery options.
|
||||
Config.StealDeadPlayer = true -- [EDIT] Allow looting dead players.
|
||||
Config.StealWithoutWeapons = false -- [EDIT] Can only rob if target is hands-up w/o weapon.
|
||||
Config.PlaceableItems = true -- [EDIT] Enable placeable items.
|
||||
Config.KQPlaceableItems = false -- [EDIT] Use KQ Placeable Items for item placement (requires kq_placeable_items resource).
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Player Inventory Capacity [EDIT]
|
||||
-- [INFO] Changing weight/slots can require wipes to avoid dupes. Be cautious.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.InventoryWeight = { -- [EDIT]
|
||||
weight = 120000, -- [INFO] Max weight (grams).
|
||||
slots = 41, -- [INFO] Set 40 to remove protected 6th slot.
|
||||
}
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Drop (Ground) Capacity [EDIT]
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.DropWeight = { -- [EDIT]
|
||||
weight = 20000000, -- [INFO] Max ground drop capacity (grams).
|
||||
slots = 130, -- [INFO] Max slots for a ground drop.
|
||||
}
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Label Change [EDIT]
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.LabelChange = true -- [EDIT] Allow item renaming.
|
||||
Config.LabelChangePrice = false -- [EDIT] Price or false for free.
|
||||
Config.BlockedLabelChangeItems = { -- [EDIT] Items that cannot be renamed.
|
||||
money = true,
|
||||
phone = true,
|
||||
}
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Hotbar [EDIT]
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.UsableItemsFromHotbar = true -- [EDIT] Use items from hotbar (1–5).
|
||||
Config.BlockedItemsHotbar = { -- [EDIT] Items blocked from hotbar use.
|
||||
'lockpick',
|
||||
-- Add more here ...
|
||||
}
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Backpack & Item Rules [EDIT]
|
||||
-- [INFO] One-per-item limits, non-stealable and non-storable item lists.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.OnePerItem = { -- [EDIT] Max quantity per item type.
|
||||
backpack = 1,
|
||||
-- Add more items as needed.
|
||||
}
|
||||
|
||||
Config.notStolenItems = { -- [EDIT] Items that cannot be stolen.
|
||||
id_card = true,
|
||||
water_bottle = true,
|
||||
tosti = true,
|
||||
}
|
||||
|
||||
Config.notStoredItems = { -- [EDIT] Items that cannot be stashed.
|
||||
backpack = true,
|
||||
}
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Armor [EDIT]
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.DrawableArmor = 100 -- [EDIT] Armor points granted when wearing an armor vest.
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Clothing System Integration [EDIT]
|
||||
-- [INFO] Enables or disables clothing system integration. Refer to documentation:
|
||||
-- ESX Docs: https://docs.quasar-store.com/ Inventory > Functions > Clothing
|
||||
-- QB Docs: https://docs.quasar-store.com/
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.Clothing = true -- [EDIT] Enables clothing options in inventory (adds clothing button).
|
||||
|
||||
---@type ClotheSlot[]
|
||||
Config.ClothingSlots = { -- [EDIT] Define which slots are used for clothing pieces.
|
||||
{
|
||||
name = 'helmet',
|
||||
slot = 1,
|
||||
type = 'head',
|
||||
wearType = 'prop',
|
||||
componentId = 0,
|
||||
anim = { dict = 'mp_masks@standard_car@ds@', anim = 'put_on_mask', flags = 49 }
|
||||
},
|
||||
{
|
||||
name = 'mask',
|
||||
slot = 2,
|
||||
type = 'head',
|
||||
wearType = 'drawable',
|
||||
componentId = 1,
|
||||
anim = { dict = 'mp_masks@standard_car@ds@', anim = 'put_on_mask', flags = 49 }
|
||||
},
|
||||
{
|
||||
name = 'glasses',
|
||||
slot = 3,
|
||||
type = 'head',
|
||||
wearType = 'prop',
|
||||
componentId = 1,
|
||||
anim = { dict = 'clothingspecs', anim = 'take_off', flags = 49 }
|
||||
},
|
||||
{
|
||||
name = 'torso',
|
||||
slot = 4,
|
||||
type = 'body',
|
||||
wearType = 'drawable',
|
||||
componentId = 11,
|
||||
anim = { dict = 'missmic4', anim = 'michael_tux_fidget', flags = 49 }
|
||||
},
|
||||
{
|
||||
name = 'tshirt',
|
||||
slot = 5,
|
||||
type = 'body',
|
||||
wearType = 'drawable',
|
||||
componentId = 8,
|
||||
anim = { dict = 'clothingtie', anim = 'try_tie_negative_a', flags = 49 }
|
||||
},
|
||||
{
|
||||
name = 'jeans',
|
||||
slot = 6,
|
||||
type = 'body',
|
||||
wearType = 'drawable',
|
||||
componentId = 4,
|
||||
anim = { dict = 'missmic4', anim = 'michael_tux_fidget', flags = 49 }
|
||||
},
|
||||
{
|
||||
name = 'arms',
|
||||
slot = 7,
|
||||
type = 'body',
|
||||
wearType = 'drawable',
|
||||
componentId = 3,
|
||||
anim = { dict = 'nmt_3_rcm-10', anim = 'cs_nigel_dual-10', flags = 49 }
|
||||
},
|
||||
{
|
||||
name = 'shoes',
|
||||
slot = 8,
|
||||
type = 'body',
|
||||
wearType = 'drawable',
|
||||
componentId = 6,
|
||||
anim = { dict = 'random@domestic', anim = 'pickup_low', flags = 49 }
|
||||
},
|
||||
{
|
||||
name = 'ears',
|
||||
slot = 9,
|
||||
type = 'body',
|
||||
wearType = 'prop',
|
||||
componentId = 2,
|
||||
anim = { dict = 'mp_cp_stolen_tut', anim = 'b_think', flags = 49 }
|
||||
},
|
||||
{
|
||||
name = 'bag',
|
||||
slot = 10,
|
||||
type = 'addon',
|
||||
wearType = 'drawable',
|
||||
componentId = 5,
|
||||
anim = { dict = 'anim@heists@ornate_bank@grab_cash', anim = 'intro', flags = 49 }
|
||||
},
|
||||
{
|
||||
name = 'watch',
|
||||
slot = 11,
|
||||
type = 'addon',
|
||||
wearType = 'prop',
|
||||
componentId = 6,
|
||||
anim = { dict = 'nmt_3_rcm-10', anim = 'cs_nigel_dual-10', flags = 49 }
|
||||
},
|
||||
{
|
||||
name = 'bracelets',
|
||||
slot = 12,
|
||||
type = 'addon',
|
||||
wearType = 'prop',
|
||||
componentId = 7,
|
||||
anim = { dict = 'nmt_3_rcm-10', anim = 'cs_nigel_dual-10', flags = 49 }
|
||||
},
|
||||
{
|
||||
name = 'chain',
|
||||
slot = 13,
|
||||
type = 'addon',
|
||||
wearType = 'drawable',
|
||||
componentId = 7,
|
||||
anim = { dict = 'nmt_3_rcm-10', anim = 'cs_nigel_dual-10', flags = 49 }
|
||||
},
|
||||
{
|
||||
name = 'vest',
|
||||
slot = 14,
|
||||
type = 'addon',
|
||||
wearType = 'drawable',
|
||||
componentId = 9,
|
||||
anim = { dict = 'nmt_3_rcm-10', anim = 'cs_nigel_dual-10', flags = 49 }
|
||||
},
|
||||
}
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Appearance System Detection [AUTO]
|
||||
-- [INFO] Auto-detects supported appearance/clothing resources.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
local appearances = { -- [CORE] Resource name → internal alias
|
||||
['illenium-appearance'] = 'illenium',
|
||||
['qs-appearance'] = 'illenium',
|
||||
['rcore_clothing'] = 'rcore',
|
||||
['esx_skin'] = 'esx',
|
||||
['qb-clothing'] = 'qb'
|
||||
}
|
||||
Config.Appearance = DependencyCheck(appearances) or 'standalone' -- [AUTO]
|
||||
|
||||
Config.TakePreviousClothes = false -- [EDIT] Adds previous worn clothes back to inventory when changing.
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Drop Settings [EDIT]
|
||||
-- [INFO] Control dropped items visuals and refresh system.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.ItemDropObject = `prop_paper_bag_small` -- [EDIT] Model for dropped items (false = no object)
|
||||
Config.DropRefreshTime = 15 * 60 -- [EDIT] Refresh time for ground items (seconds)
|
||||
Config.MaxDropViewDistance = 9.5 -- [EDIT] Max view distance for dropped items
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Gender System [EDIT]
|
||||
-- [INFO] Defines available gender labels for use in UI and logic.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.Genders = {
|
||||
['m'] = 'Male',
|
||||
['f'] = 'Female',
|
||||
[1] = 'Male',
|
||||
[2] = 'Female'
|
||||
}
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Visual Configuration [EDIT]
|
||||
-- [INFO] Controls animations, UI logo, idle camera and sidebar visibility.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.OpenInventoryAnim = true -- [EDIT] Play animation when opening inventory
|
||||
Config.OpenInventoryScene = false -- [EDIT] Toggle scene animation
|
||||
Config.Logo = 'https://i.ibb.co/CJfj6KV/Mini-copia.png' -- [EDIT] Logo (URL or local path)
|
||||
Config.IdleCamera = true -- [EDIT] Enable idle camera while inventory open
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Sidebar & Display Options [EDIT]
|
||||
-- [INFO] Defines what stats and menus appear in the UI.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.InventoryOptions = {
|
||||
['clothes'] = Config.Clothing, -- [EDIT] Enable clothing button
|
||||
['configuration'] = true, -- [EDIT] Show config menu
|
||||
['health'] = true, -- [EDIT] Show player health
|
||||
['armor'] = true, -- [EDIT] Show armor level
|
||||
['hunger'] = true, -- [EDIT] Show hunger
|
||||
['thirst'] = true, -- [EDIT] Show thirst
|
||||
['id'] = true, -- [EDIT] Show player ID
|
||||
['money'] = true, -- [EDIT] Show cash
|
||||
['bank'] = true, -- [EDIT] Show bank balance
|
||||
['blackmoney'] = true, -- [EDIT] Show black money
|
||||
}
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Item Mini Icons [EDIT]
|
||||
-- [INFO] Assign FontAwesome icons to items in UI. (https://fontawesome.com/)
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.ItemMiniIcons = {
|
||||
['tosti'] = { icon = 'fa-solid fa-utensils' },
|
||||
['water_bottle'] = { icon = 'fa-solid fa-utensils' },
|
||||
}
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Item Rarities [EDIT]
|
||||
-- [INFO] Define rarity gradients for inventory visuals.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.ItemRarities = {
|
||||
{ name = 'common', css = 'background-image: linear-gradient(to top, rgba(211,211,211,0.5), rgba(211,211,211,0) 60%)' },
|
||||
{ name = 'epic', css = 'background-image: linear-gradient(to top, rgba(128,0,128,0.5), rgba(128,0,128,0) 60%)' },
|
||||
{ name = 'legendary', css = 'background-image: linear-gradient(to top, rgba(255,215,0,0.5), rgba(255,215,0,0) 60%)' },
|
||||
}
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Default Character Appearance [EDIT]
|
||||
-- [INFO] Base clothing sets per gender. Adjust for custom clothing systems.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.Defaults = {
|
||||
['female'] = {
|
||||
torso = 18,
|
||||
jeans = 19,
|
||||
shoes = 34,
|
||||
arms = 15,
|
||||
helmet = -1,
|
||||
glasses = -1,
|
||||
mask = 0,
|
||||
tshirt = 2,
|
||||
ears = -1,
|
||||
bag = 0,
|
||||
watch = -1,
|
||||
chain = 0,
|
||||
bracelets = -1,
|
||||
vest = 0,
|
||||
},
|
||||
['male'] = {
|
||||
torso = 15,
|
||||
jeans = 14,
|
||||
shoes = 34,
|
||||
arms = 15,
|
||||
helmet = -1,
|
||||
glasses = -1,
|
||||
mask = 0,
|
||||
tshirt = 15,
|
||||
ears = -1,
|
||||
bag = 0,
|
||||
watch = -1,
|
||||
chain = 0,
|
||||
bracelets = -1,
|
||||
vest = 0,
|
||||
}
|
||||
}
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Compact Inventory [EDIT]
|
||||
-- [INFO] Turns your inventory into a compact, side-mounted interface allowing
|
||||
-- movement while open — signature Quasar experience.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.CompactInventory = false -- [EDIT] Enables compact view for a smaller, mobile-friendly layout.
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Key Bindings [EDIT]
|
||||
-- [INFO] Define shortcut keys for inventory actions. See documentation for keymap setup.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.KeyBinds = { -- [EDIT]
|
||||
inventory = 'TAB', -- [INFO] Open inventory
|
||||
hotbar = 'Z', -- [INFO] Show hotbar
|
||||
reload = 'R', -- [INFO] Reload action
|
||||
handsup = 'X', -- [INFO] Hands-up/robbery gesture
|
||||
}
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Debug & Development Tools [EDIT]
|
||||
-- [INFO] Enables development logs and debugging prints. Use only during testing.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.Debug = true -- [EDIT] Detailed console prints
|
||||
Config.ZoneDebug = false -- [EDIT] Display additional zone debug info
|
||||
Config.InventoryPrefix = 'inventory' -- [ADV] Internal prefix; changing requires code adjustments
|
||||
Config.SaveInventoryInterval = 12500 -- [EDIT] Autosave interval (ms)
|
||||
Config.BypassQbInventory = true -- [EDIT] Bypass qb-inventory for QS compatibility
|
||||
|
||||
--[[ [INFO]
|
||||
The system now saves inventories when updates occur instead of on close,
|
||||
reducing duplication risks. Avoid frequent restarts, as unsaved data may be lost.
|
||||
|
||||
Command available:
|
||||
/save-inventories → Manually saves all inventories before restart.
|
||||
]]
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Free Mode Keys [EDIT]
|
||||
-- [INFO] Controls for object manipulation during free placement/edit modes.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.FreeModeKeys = {
|
||||
ChangeKey = Keys['LEFTCTRL'], -- [EDIT] Toggle free mode
|
||||
MoreSpeed = Keys['.'], -- [EDIT] Increase move speed
|
||||
LessSpeed = Keys[','], -- [EDIT] Decrease move speed
|
||||
MoveToTop = Keys['TOP'], -- [EDIT] Move upward
|
||||
MoveToDown = Keys['DOWN'], -- [EDIT] Move downward
|
||||
MoveToForward = Keys['TOP'], -- [EDIT] Move forward
|
||||
MoveToBack = Keys['DOWN'], -- [EDIT] Move backward
|
||||
MoveToRight = Keys['RIGHT'], -- [EDIT] Move right
|
||||
MoveToLeft = Keys['LEFT'], -- [EDIT] Move left
|
||||
RotateToTop = Keys['6'], -- [EDIT] Rotate upward
|
||||
RotateToDown = Keys['7'], -- [EDIT] Rotate downward
|
||||
RotateToLeft = Keys['8'], -- [EDIT] Rotate left
|
||||
RotateToRight = Keys['9'], -- [EDIT] Rotate right
|
||||
TiltToTop = Keys['Z'], -- [EDIT] Tilt upward
|
||||
TiltToDown = Keys['X'], -- [EDIT] Tilt downward
|
||||
TiltToLeft = Keys['C'], -- [EDIT] Tilt left
|
||||
TiltToRight = Keys['V'], -- [EDIT] Tilt right
|
||||
StickToTheGround = Keys['LEFTALT'], -- [EDIT] Snap object to ground
|
||||
}
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Editor Action Controls [EDIT]
|
||||
-- [INFO] Keybinds used in world/zone editing for point and rotation handling.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
ActionControls = {
|
||||
leftClick = { label = 'Place Object', codes = { 24 } }, -- [EDIT]
|
||||
forward = { label = 'Forward +/-', codes = { 33, 32 } }, -- [EDIT] Move forward/backward
|
||||
right = { label = 'Right +/-', codes = { 35, 34 } }, -- [EDIT] Move left/right
|
||||
up = { label = 'Up +/-', codes = { 52, 51 } }, -- [EDIT] Raise/lower vertically
|
||||
add_point = { label = 'Add Point', codes = { 24 } }, -- [EDIT]
|
||||
undo_point = { label = 'Undo Last', codes = { 25 } }, -- [EDIT]
|
||||
rotate_z = { label = 'RotateZ +/-', codes = { 20, 79 } }, -- [EDIT] Z-axis rotation
|
||||
rotate_y = { label = 'RotateY +/-', codes = { 29, 249 } }, -- [EDIT] Y-axis rotation
|
||||
rotate_x = { label = 'RotateX +/-', codes = { 311, 182 } }, -- [EDIT] X-axis rotation
|
||||
rotate_z_scroll = { label = 'RotateZ +/-', codes = { 17, 16 } }, -- [EDIT] Z-axis via scroll modifiers
|
||||
offset_z = { label = 'Offset Z +/-', codes = { 44, 46 } }, -- [EDIT] Vertical offset
|
||||
boundary_height = { label = 'Z Boundary +/-', codes = { 20, 73 } }, -- [EDIT] Change Z boundary
|
||||
done = { label = 'Done', codes = { 191 } }, -- [EDIT] Confirm/finish
|
||||
cancel = { label = 'Cancel', codes = { 194 } }, -- [EDIT] Cancel current action
|
||||
throw = { label = 'Throw', codes = { 24, 25 } }, -- [EDIT] Throw current weapon
|
||||
}
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Free Camera Options [EDIT]
|
||||
-- [INFO] Camera movement and rotation speed configuration for editors/previews.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
CameraOptions = {
|
||||
lookSpeedX = 1000.0, -- [EDIT] Horizontal camera movement speed
|
||||
lookSpeedY = 1000.0, -- [EDIT] Vertical camera movement speed
|
||||
moveSpeed = 20.0, -- [EDIT] Free camera move speed
|
||||
climbSpeed = 10.0, -- [EDIT] Up/Down movement speed
|
||||
rotateSpeed = 20.0, -- [EDIT] Rotation speed
|
||||
}
|
||||
@@ -0,0 +1,236 @@
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Quasar Store · Configuration Guidelines
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- This configuration file defines all adjustable parameters for the script.
|
||||
-- Comments are standardized to help you identify which sections you can safely edit.
|
||||
--
|
||||
-- • [EDIT] – Safe for users to modify. Adjust these values as needed.
|
||||
-- • [INFO] – Informational note describing what the variable or block does.
|
||||
-- • [ADV] – Advanced settings. Change only if you understand the logic behind it.
|
||||
-- • [CORE] – Core functionality. Do not modify unless you are a developer.
|
||||
-- • [AUTO] – Automatically handled by the system. Never edit manually.
|
||||
--
|
||||
-- Always make a backup before editing configuration files.
|
||||
-- Incorrect changes in [CORE] or [AUTO] sections can break the resource.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Crafting System [EDIT]
|
||||
-- [INFO] Independent crafting, no DLC required. Supports success chance, and
|
||||
-- (opcional) reputación en QBCore para bloquear/mostrar recetas.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.Crafting = true -- [EDIT] Toggle the crafting system on/off
|
||||
|
||||
--[[ [INFO]
|
||||
Noteworthy features:
|
||||
- Per-item success chance (1–100%)
|
||||
- Reputation-based visibility (QBCore): 'craftingrep' / 'attachmentcraftingrep'
|
||||
- Configure 'rep' fields and thresholds per your server design.
|
||||
]]
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Reputation (QBCore only) [EDIT]
|
||||
-- [INFO] Gate items behind reputation levels. Only for QBCore frameworks.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.CraftingReputation = false -- [EDIT] Enable reputation gating (QBCore)
|
||||
Config.ThresholdItems = false -- [EDIT] Show items only if rep >= threshold (QBCore)
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Example Item Entry (Reference) [INFO]
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
--[[
|
||||
[1] = {
|
||||
name = "weapon_pistol",
|
||||
amount = 50,
|
||||
info = {},
|
||||
costs = {
|
||||
["iron"] = 80,
|
||||
["metalscrap"] = 120,
|
||||
["rubber"] = 8,
|
||||
["steel"] = 133,
|
||||
["lockpick"] = 5,
|
||||
},
|
||||
type = "weapon", -- "item" | "weapon"
|
||||
slot = 1,
|
||||
rep = 'attachmentcraftingrep', -- QBCore only
|
||||
points = 1, -- QBCore only (reward on craft)
|
||||
threshold = 0, -- QBCore only (visibility)
|
||||
time = 5500, -- ms
|
||||
chance = 100 -- 1..100 success probability
|
||||
},
|
||||
]]
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- External Crafting Event (Sample) [ADV]
|
||||
-- [INFO] Example to open a custom crafting menu from another script/event.
|
||||
-- ⚠ Posible typo: export 'SetUpCrafing' → suele ser 'SetUpCrafting'. Mantengo tu nombre.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
function OpenCrafting()
|
||||
local CustomCrafting = {
|
||||
[1] = {
|
||||
name = 'weapon_pistol',
|
||||
amount = 50,
|
||||
info = {},
|
||||
costs = { ['tosti'] = 1 },
|
||||
type = 'weapon',
|
||||
slot = 1,
|
||||
rep = 'attachmentcraftingrep',
|
||||
points = 1,
|
||||
threshold = 0,
|
||||
time = 5500,
|
||||
chance = 100
|
||||
},
|
||||
[2] = {
|
||||
name = 'water_bottle',
|
||||
amount = 1,
|
||||
info = {},
|
||||
costs = { ['tosti'] = 1 },
|
||||
type = 'item',
|
||||
slot = 2,
|
||||
rep = 'attachmentcraftingrep',
|
||||
points = 1,
|
||||
threshold = 0,
|
||||
time = 8500,
|
||||
chance = 100
|
||||
},
|
||||
}
|
||||
|
||||
local items = exports['qs-inventory']:SetUpCrafing(CustomCrafting) -- [INFO] Revisa el nombre del export si fuera necesario.
|
||||
local crafting = { label = 'Craft', items = items }
|
||||
|
||||
TriggerServerEvent('inventory:server:SetInventoryItems', items)
|
||||
TriggerServerEvent('inventory:server:OpenInventory', 'customcrafting', crafting.label, crafting)
|
||||
end
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Crafting Tables [EDIT]
|
||||
-- [INFO] Define mesas de crafteo por job/ubicación, con blip y recetas propias.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.CraftingTables = {
|
||||
[1] = {
|
||||
name = 'Police Crafting',
|
||||
isjob = 'police',
|
||||
grades = 'all',
|
||||
text = '[E] - Police Craft',
|
||||
blip = {
|
||||
enabled = true,
|
||||
title = 'Police Crafting',
|
||||
scale = 1.0,
|
||||
display = 4,
|
||||
colour = 0,
|
||||
id = 365
|
||||
},
|
||||
location = vec3(459.771423, -989.050537, 24.898926),
|
||||
items = {
|
||||
[1] = {
|
||||
name = 'weapon_pistol',
|
||||
amount = 50,
|
||||
info = {},
|
||||
costs = {
|
||||
['iron'] = 80,
|
||||
['metalscrap'] = 70,
|
||||
['rubber'] = 8,
|
||||
['steel'] = 60,
|
||||
['lockpick'] = 5,
|
||||
},
|
||||
type = 'weapon',
|
||||
slot = 1,
|
||||
rep = 'attachmentcraftingrep',
|
||||
points = 1,
|
||||
threshold = 0,
|
||||
time = 5500,
|
||||
chance = 100
|
||||
},
|
||||
[2] = {
|
||||
name = 'weapon_smg',
|
||||
amount = 1,
|
||||
info = {},
|
||||
costs = {
|
||||
['iron'] = 80,
|
||||
['metalscrap'] = 120,
|
||||
['rubber'] = 10,
|
||||
['steel'] = 65,
|
||||
['lockpick'] = 10,
|
||||
},
|
||||
type = 'weapon',
|
||||
slot = 2,
|
||||
rep = 'attachmentcraftingrep',
|
||||
points = 1,
|
||||
threshold = 0,
|
||||
time = 8500,
|
||||
chance = 100
|
||||
},
|
||||
[3] = {
|
||||
name = 'weapon_carbinerifle',
|
||||
amount = 1,
|
||||
info = {},
|
||||
costs = {
|
||||
['iron'] = 120,
|
||||
['metalscrap'] = 120,
|
||||
['rubber'] = 20,
|
||||
['steel'] = 90,
|
||||
['lockpick'] = 14,
|
||||
},
|
||||
type = 'weapon',
|
||||
slot = 3,
|
||||
rep = 'craftingrep',
|
||||
points = 2,
|
||||
threshold = 0,
|
||||
time = 12000,
|
||||
chance = 100
|
||||
}
|
||||
}
|
||||
},
|
||||
[2] = {
|
||||
name = 'Attachment Crafting',
|
||||
isjob = false,
|
||||
grades = 'all',
|
||||
text = '[E] - Craft Attachment',
|
||||
blip = {
|
||||
enabled = true,
|
||||
title = 'Attachment Crafting',
|
||||
scale = 1.0,
|
||||
display = 4,
|
||||
colour = 0,
|
||||
id = 365
|
||||
},
|
||||
location = vec3(90.303299, 3745.503418, 39.771484),
|
||||
items = {
|
||||
[1] = {
|
||||
name = 'pistol_extendedclip',
|
||||
amount = 50,
|
||||
info = {},
|
||||
costs = {
|
||||
['metalscrap'] = 140,
|
||||
['steel'] = 250,
|
||||
['rubber'] = 60,
|
||||
},
|
||||
type = 'item',
|
||||
slot = 1,
|
||||
rep = 'attachmentcraftingrep',
|
||||
points = 1,
|
||||
threshold = 0,
|
||||
time = 8000,
|
||||
chance = 90
|
||||
},
|
||||
[2] = {
|
||||
name = 'pistol_suppressor',
|
||||
amount = 50,
|
||||
info = {},
|
||||
costs = {
|
||||
['metalscrap'] = 165,
|
||||
['steel'] = 285,
|
||||
['rubber'] = 75,
|
||||
},
|
||||
type = 'item',
|
||||
slot = 2,
|
||||
rep = 'attachmentcraftingrep',
|
||||
points = 1,
|
||||
threshold = 0,
|
||||
time = 8000,
|
||||
chance = 90
|
||||
},
|
||||
}
|
||||
},
|
||||
-- Continue with the same structure for the other Crafting Tables...
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Custom Weapons [EDIT]
|
||||
-- [INFO] Map weapon names to allowed attachments and durability loss per shot.
|
||||
-- [INFO] You must also register these in items.lua and weapons.lua.
|
||||
-- [REF] Example reference: https://github.com/NoobySloth/Custom-Weapons/tree/main
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.CustomWeapons = {
|
||||
-- -- Example:
|
||||
-- ['WEAPON_AK47'] = {
|
||||
-- attachments = {
|
||||
-- defaultclip = { component = 'COMPONENT_AK47_CLIP_01', item = 'rifle_defaultclip' }, -- [EDIT]
|
||||
-- extendedclip = { component = 'COMPONENT_AK47_CLIP_02', item = 'rifle_extendedclip' }, -- [EDIT]
|
||||
-- -- Add more: scope = { component = 'COMPONENT_AK47_SCOPE', item = 'rifle_scope' },
|
||||
-- },
|
||||
-- durability = 0.15 -- [EDIT] Durability decay per shot (0.0–1.0; higher = wears faster)
|
||||
-- },
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
//──────────────────────────────────────────────────────────────────────────────
|
||||
// Quasar Store · Configuration Guidelines
|
||||
//──────────────────────────────────────────────────────────────────────────────
|
||||
// This configuration file defines all adjustable parameters for the script.
|
||||
// Comments are standardized to help you identify which sections you can safely edit.
|
||||
//
|
||||
// • [EDIT] – Safe for users to modify. Adjust these values as needed.
|
||||
// • [INFO] – Informational note describing what the variable or block does.
|
||||
// • [ADV] – Advanced settings. Change only if you understand the logic behind it.
|
||||
// • [CORE] – Core functionality. Do not modify unless you are a developer.
|
||||
// • [AUTO] – Automatically handled by the system. Never edit manually.
|
||||
//
|
||||
// Always make a backup before editing configuration files.
|
||||
// Incorrect changes in [CORE] or [AUTO] sections can break the resource.
|
||||
//──────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
//──────────────────────────────────────────────────────────────────────────────
|
||||
// Interface · Default Color Configuration [EDIT]
|
||||
//──────────────────────────────────────────────────────────────────────────────
|
||||
// [INFO] Defines the base color palette and visual balance for the interface.
|
||||
// All values must be in hexadecimal format. Avoid RGB to prevent rendering issues.
|
||||
// Use the RESET button in UI to restore factory defaults.
|
||||
//──────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
// Primary and Secondary Colors
|
||||
const defaultPrimaryColor = "#0E151B" // [EDIT] Base color for main UI backgrounds and buttons
|
||||
const defaultPrimaryOpacity = "0.2" // [EDIT] Opacity level for primary color (0.0–1.0)
|
||||
const defaultSecondaryColor = "#0E151B" // [EDIT] Secondary UI color for complementary elements
|
||||
const defaultSecondaryOpacity = "1.0" // [EDIT] Full opacity for strong visibility
|
||||
|
||||
// Borders and Text
|
||||
const defaultBorderColor = "#00A3FF" // [EDIT] Highlight color for UI borders and interactive elements
|
||||
const defaultBorderOpacity = "0.6" // [EDIT] Semi-transparent level for UI borders
|
||||
const defaultBorderRadius = "1px" // [EDIT] Defines corner roundness for UI boxes
|
||||
const defaultTextColor = "#FFFFFF" // [EDIT] Default text color ensuring readability on dark UI
|
||||
@@ -0,0 +1,340 @@
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Quasar Store · Configuration Guidelines
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- This configuration file defines all adjustable parameters for the script.
|
||||
-- Comments are standardized to help you identify which sections you can safely edit.
|
||||
--
|
||||
-- • [EDIT] – Safe for users to modify. Adjust these values as needed.
|
||||
-- • [INFO] – Informational note describing what the variable or block does.
|
||||
-- • [ADV] – Advanced settings. Change only if you understand the logic behind it.
|
||||
-- • [CORE] – Core functionality. Do not modify unless you are a developer.
|
||||
-- • [AUTO] – Automatically handled by the system. Never edit manually.
|
||||
--
|
||||
-- Always make a backup before editing configuration files.
|
||||
-- Incorrect changes in [CORE] or [AUTO] sections can break the resource.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Garbage Scavenging [EDIT]
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- [INFO] Controls the lootable garbage cans system. Players can search bins or dumpsters
|
||||
-- around the map to find random items with dynamic amounts and rarity.
|
||||
-- Each prop listed below can be configured individually for slot count and loot pool.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.GarbageItems = {} -- [INFO] Reserved for future garbage-related flags or logic extensions.
|
||||
Config.GarbageRefreshTime = 2 * 60 -- 2 hours
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Garbage Objects (Registered Props) [EDIT]
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- [INFO] This list defines the in-world dumpster models that can be looted.
|
||||
-- If your server does not use targeting, this section can be ignored.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.GarbageObjects = {
|
||||
'prop_dumpster_02a', -- Standard dumpster
|
||||
'prop_dumpster_4b', -- Large blue dumpster
|
||||
'prop_dumpster_4a', -- Large green dumpster
|
||||
'prop_dumpster_3a', -- Small gray dumpster
|
||||
'prop_dumpster_02b', -- Alternate dumpster model
|
||||
'prop_dumpster_01a' -- Basic dumpster model
|
||||
}
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Loot Tables Per Prop [EDIT]
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- [INFO] Maps dumpster models (joaat hashes) to their respective loot inventories.
|
||||
-- Each entry defines:
|
||||
-- • label → UI label shown when looting
|
||||
-- • slots → max number of items the container can hold
|
||||
-- • items → actual loot entries with random quantity ranges
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.GarbageItemsForProp = {
|
||||
[joaat('prop_dumpster_02a')] = {
|
||||
label = 'Garbage', -- [INFO] UI label displayed when interacting
|
||||
slots = 30, -- [EDIT] Total available item slots in dumpster
|
||||
items = {
|
||||
[1] = {
|
||||
[1] = {
|
||||
name = 'aluminum',
|
||||
amount = { min = 1, max = 5 },
|
||||
info = {},
|
||||
type = 'item',
|
||||
slot = 1,
|
||||
},
|
||||
[2] = {
|
||||
name = 'metalscrap',
|
||||
amount = { min = 1, max = 5 },
|
||||
info = {},
|
||||
type = 'item',
|
||||
slot = 2,
|
||||
},
|
||||
},
|
||||
[2] = {
|
||||
[1] = {
|
||||
name = 'iron',
|
||||
amount = { min = 1, max = 5 },
|
||||
info = {},
|
||||
type = 'item',
|
||||
slot = 1,
|
||||
},
|
||||
[2] = {
|
||||
name = 'steel',
|
||||
amount = { min = 1, max = 5 },
|
||||
info = {},
|
||||
type = 'item',
|
||||
slot = 2,
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
[joaat('prop_dumpster_4b')] = {
|
||||
label = 'Garbage',
|
||||
slots = 30,
|
||||
items = {
|
||||
[1] = {
|
||||
[1] = {
|
||||
name = 'aluminum',
|
||||
amount = {
|
||||
min = 1,
|
||||
max = 5
|
||||
},
|
||||
info = {},
|
||||
type = 'item',
|
||||
slot = 1,
|
||||
},
|
||||
[2] = {
|
||||
name = 'plastic',
|
||||
amount = {
|
||||
min = 1,
|
||||
max = 5
|
||||
},
|
||||
info = {},
|
||||
type = 'item',
|
||||
slot = 2,
|
||||
},
|
||||
},
|
||||
[2] = {
|
||||
[1] = {
|
||||
name = 'plastic',
|
||||
amount = {
|
||||
min = 1,
|
||||
max = 5
|
||||
},
|
||||
info = {},
|
||||
type = 'item',
|
||||
slot = 1,
|
||||
},
|
||||
[2] = {
|
||||
name = 'metalscrap',
|
||||
amount = {
|
||||
min = 1,
|
||||
max = 5
|
||||
},
|
||||
info = {},
|
||||
type = 'item',
|
||||
slot = 2,
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
[joaat('prop_dumpster_4a')] = {
|
||||
label = 'Garbage',
|
||||
slots = 30,
|
||||
items = {
|
||||
[1] = {
|
||||
[1] = {
|
||||
name = 'aluminum',
|
||||
amount = {
|
||||
min = 1,
|
||||
max = 5
|
||||
},
|
||||
info = {},
|
||||
type = 'item',
|
||||
slot = 1,
|
||||
},
|
||||
[2] = {
|
||||
name = 'metalscrap',
|
||||
amount = {
|
||||
min = 1,
|
||||
max = 5
|
||||
},
|
||||
info = {},
|
||||
type = 'item',
|
||||
slot = 2,
|
||||
},
|
||||
},
|
||||
[2] = {
|
||||
[1] = {
|
||||
name = 'glass',
|
||||
amount = {
|
||||
min = 1,
|
||||
max = 5
|
||||
},
|
||||
info = {},
|
||||
type = 'item',
|
||||
slot = 1,
|
||||
},
|
||||
[2] = {
|
||||
name = 'joint',
|
||||
amount = {
|
||||
min = 1,
|
||||
max = 5
|
||||
},
|
||||
info = {},
|
||||
type = 'item',
|
||||
slot = 2,
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
[joaat('prop_dumpster_3a')] = {
|
||||
label = 'Garbage',
|
||||
slots = 30,
|
||||
items = {
|
||||
[1] = {
|
||||
[1] = {
|
||||
name = 'aluminum',
|
||||
amount = {
|
||||
min = 1,
|
||||
max = 5
|
||||
},
|
||||
info = {},
|
||||
type = 'item',
|
||||
slot = 1,
|
||||
},
|
||||
[2] = {
|
||||
name = 'lighter',
|
||||
amount = {
|
||||
min = 1,
|
||||
max = 5
|
||||
},
|
||||
info = {},
|
||||
type = 'item',
|
||||
slot = 2,
|
||||
},
|
||||
},
|
||||
[2] = {
|
||||
[1] = {
|
||||
name = 'metalscrap',
|
||||
amount = {
|
||||
min = 1,
|
||||
max = 5
|
||||
},
|
||||
info = {},
|
||||
type = 'item',
|
||||
slot = 1,
|
||||
},
|
||||
[2] = {
|
||||
name = 'rubber',
|
||||
amount = {
|
||||
min = 1,
|
||||
max = 5
|
||||
},
|
||||
info = {},
|
||||
type = 'item',
|
||||
slot = 2,
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
[joaat('prop_dumpster_02b')] = {
|
||||
label = 'Garbage',
|
||||
slots = 30,
|
||||
items = {
|
||||
[1] = {
|
||||
[1] = {
|
||||
name = 'metalscrap',
|
||||
amount = {
|
||||
min = 1,
|
||||
max = 5
|
||||
},
|
||||
info = {},
|
||||
type = 'item',
|
||||
slot = 1,
|
||||
},
|
||||
[2] = {
|
||||
name = 'rubber',
|
||||
amount = {
|
||||
min = 1,
|
||||
max = 5
|
||||
},
|
||||
info = {},
|
||||
type = 'item',
|
||||
slot = 2,
|
||||
},
|
||||
},
|
||||
[2] = {
|
||||
[1] = {
|
||||
name = 'iron',
|
||||
amount = {
|
||||
min = 1,
|
||||
max = 5
|
||||
},
|
||||
info = {},
|
||||
type = 'item',
|
||||
slot = 1,
|
||||
},
|
||||
[2] = {
|
||||
name = 'steel',
|
||||
amount = {
|
||||
min = 1,
|
||||
max = 5
|
||||
},
|
||||
info = {},
|
||||
type = 'item',
|
||||
slot = 2,
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
[joaat('prop_dumpster_01a')] = {
|
||||
label = 'Garbage',
|
||||
slots = 30,
|
||||
items = {
|
||||
[1] = {
|
||||
[1] = {
|
||||
name = 'plastic',
|
||||
amount = {
|
||||
min = 1,
|
||||
max = 5
|
||||
},
|
||||
info = {},
|
||||
type = 'item',
|
||||
slot = 1,
|
||||
},
|
||||
[2] = {
|
||||
name = 'metalscrap',
|
||||
amount = {
|
||||
min = 1,
|
||||
max = 5
|
||||
},
|
||||
info = {},
|
||||
type = 'item',
|
||||
slot = 2,
|
||||
},
|
||||
},
|
||||
[2] = {
|
||||
[1] = {
|
||||
name = 'lighter',
|
||||
amount = {
|
||||
min = 1,
|
||||
max = 5
|
||||
},
|
||||
info = {},
|
||||
type = 'item',
|
||||
slot = 1,
|
||||
},
|
||||
[2] = {
|
||||
name = 'metalscrap',
|
||||
amount = {
|
||||
min = 1,
|
||||
max = 5
|
||||
},
|
||||
info = {},
|
||||
type = 'item',
|
||||
slot = 2,
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,366 @@
|
||||
/*──────────────────────────────────────────────────────────────────────────────
|
||||
Item Info Formatter [EDIT]
|
||||
[INFO] Renders item metadata into the NUI side panel. Prioritizes metadata
|
||||
(itemData.info) over base fields and supports a verbose "showItemData"
|
||||
mode that prints all metadata as a table.
|
||||
|
||||
Main behaviors:
|
||||
• Phones list (phoneMeta) – Helper array to identify phone items. [INFO]
|
||||
• FormatItemInfo(itemData) – Entry point. Safely reads metadata and renders. [CORE]
|
||||
- If info.showItemData === true → prints all metadata via tableToString().
|
||||
- Special case: "id_card" → prints structured ID details.
|
||||
- Fallbacks ensure safe, predictable output when fields are missing.
|
||||
|
||||
Notes:
|
||||
• Keep DOM selectors (.item-info-title / .item-info-description) in sync with your UI.
|
||||
• Use `escapeHtml` for any untrusted string to avoid injection. [SEC]
|
||||
──────────────────────────────────────────────────────────────────────────────*/
|
||||
|
||||
let phoneMeta = ['phone', 'black_phone', 'yellow_phone', 'red_phone', 'green_phone', 'white_phone']; // [INFO]
|
||||
|
||||
function FormatItemInfo(itemData) {
|
||||
// Checks if itemData is valid and contains metadata info
|
||||
if (itemData != null && itemData.info != "") {
|
||||
let label = itemData?.info?.label || itemData?.label; // Sets the item label, prioritizing info metadata
|
||||
|
||||
// If item has showItemData flag, display all metadata in a table format
|
||||
if (itemData.info.showItemData) {
|
||||
$(".item-info-title").html("<p>" + itemData.label + "</p>");
|
||||
$(".item-info-description").html("<p>" + tableToString(itemData.info) + "</p>");
|
||||
return;
|
||||
}
|
||||
|
||||
// ID Card: Display CSN, first and last name, birthdate, gender, and nationality
|
||||
if (itemData.name == "id_card") {
|
||||
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
|
||||
$(".item-info-description").html(
|
||||
"<p><strong>CSN: </strong><span>" +
|
||||
(itemData.info.citizenid !== undefined ? itemData.info.citizenid : 'ID-Card ' + Math.floor(Math.random() * 99999)) +
|
||||
"</span></p><p><strong>First Name: </strong><span>" +
|
||||
itemData.info.firstname +
|
||||
"</span></p><p><strong>Last Name: </strong><span>" +
|
||||
itemData.info.lastname +
|
||||
"</span></p><p><strong>Birth Date: </strong><span>" +
|
||||
itemData.info.birthdate +
|
||||
"</span></p><p><strong>Gender: </strong><span>" +
|
||||
(itemData.info.gender !== undefined ? itemData.info.gender : 'AH-64 Apache Helicopter') +
|
||||
"</span></p><p><strong>Nationality: </strong><span>" +
|
||||
(itemData.info.nationality !== undefined ? itemData.info.nationality : 'No information') +
|
||||
"</span></p>"
|
||||
);
|
||||
}
|
||||
// Phone Items: Check if item is a phone and display relevant details if available
|
||||
else if (phoneMeta.includes(itemData.name) && itemData.info.phoneNumber) {
|
||||
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
|
||||
$(".item-info-description").html(
|
||||
"<p><strong>Phone Number: </strong><span>" +
|
||||
itemData.info.phoneNumber +
|
||||
"</span></p><p><strong>Firstname: </strong><span>" +
|
||||
itemData.info.charinfo.firstname +
|
||||
"</span></p><p><strong>Lastname: </strong><span>" +
|
||||
itemData.info.charinfo.lastname +
|
||||
"</span></p>"
|
||||
);
|
||||
// Other items
|
||||
} else if (itemData.name == "tradingcard_psa") {
|
||||
$(".item-info-title").html("<p>" + label + "</p>");
|
||||
$(".item-info-description").html(
|
||||
"<p><strong>PSA ID: </strong><span>" +
|
||||
itemData.info.serial +
|
||||
"</span></p>"
|
||||
);
|
||||
} else if (itemData.name == "photo") {
|
||||
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
|
||||
$(".item-info-description").html(
|
||||
"<p><span>" +
|
||||
itemData.info.location +
|
||||
"</span></p><span>" +
|
||||
itemData.info.date + "</span></p>"
|
||||
);
|
||||
} else if (itemData.name == "vehiclekeys") {
|
||||
$(".item-info-title").html("<p>" + label + "</p>");
|
||||
$(".item-info-description").html(
|
||||
"<p><strong>Plate: </strong><span>" +
|
||||
itemData.info.plate +
|
||||
"</span></p><p><strong>Model: </strong><span>" +
|
||||
itemData.info.description +
|
||||
"</span></p>"
|
||||
);
|
||||
} else if (itemData.name == "plate") {
|
||||
$(".item-info-title").html("<p>" + label + "</p>");
|
||||
$(".item-info-description").html(
|
||||
"<p><strong>Plate: </strong><span>" +
|
||||
itemData.info.plate +
|
||||
"</span></p>"
|
||||
);
|
||||
} else if (itemData.name == "backpack") {
|
||||
$(".item-info-title").html("<p>" + label + "</p>");
|
||||
$(".item-info-description").html(
|
||||
"<p><strong>ID: </strong><span>" +
|
||||
itemData.info.ID +
|
||||
"</span></p><p><strong>Weight: </strong><span>" +
|
||||
itemData.info.weight +
|
||||
"</span></p><p><strong>Slots: </strong><span>" +
|
||||
itemData.info.slots +
|
||||
"</span></p>"
|
||||
);
|
||||
} else if (itemData.name == "backpack2") {
|
||||
$(".item-info-title").html("<p>" + label + "</p>");
|
||||
$(".item-info-description").html(
|
||||
"<p><strong>ID: </strong><span>" +
|
||||
itemData.info.ID +
|
||||
"</span></p><p><strong>Weight: </strong><span>" +
|
||||
itemData.info.weight +
|
||||
"</span></p><p><strong>Slots: </strong><span>" +
|
||||
itemData.info.slots +
|
||||
"</span></p>"
|
||||
);
|
||||
} else if (itemData.name == "briefcase") {
|
||||
$(".item-info-title").html("<p>" + label + "</p>");
|
||||
$(".item-info-description").html(
|
||||
"<p><strong>ID: </strong><span>" +
|
||||
itemData.info.ID +
|
||||
"</span></p><p><strong>Weight: </strong><span>" +
|
||||
itemData.info.weight +
|
||||
"</span></p><p><strong>Slots: </strong><span>" +
|
||||
itemData.info.slots +
|
||||
"</span></p>"
|
||||
);
|
||||
} else if (itemData.name == "paramedicbag") {
|
||||
$(".item-info-title").html("<p>" + label + "</p>");
|
||||
$(".item-info-description").html(
|
||||
"<p><strong>ID: </strong><span>" +
|
||||
itemData.info.ID +
|
||||
"</span></p><p><strong>Weight: </strong><span>" +
|
||||
itemData.info.weight +
|
||||
"</span></p><p><strong>Slots: </strong><span>" +
|
||||
itemData.info.slots +
|
||||
"</span></p>"
|
||||
);
|
||||
} else if (itemData.name == "driver_license") {
|
||||
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
|
||||
$(".item-info-description").html(
|
||||
"<p><strong>First Name: </strong><span>" +
|
||||
itemData.info.firstname +
|
||||
"</span></p><p><strong>Last Name: </strong><span>" +
|
||||
itemData.info.lastname +
|
||||
"</span></p><p><strong>Birth Date: </strong><span>" +
|
||||
itemData.info.birthdate +
|
||||
"</span></p><p><strong>Licenses: </strong><span>" +
|
||||
itemData.info.type +
|
||||
"</span></p>"
|
||||
);
|
||||
} else if (itemData.name == "weaponlicense") {
|
||||
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
|
||||
$(".item-info-description").html(
|
||||
"<p><strong>First Name: </strong><span>" +
|
||||
itemData.info.firstname +
|
||||
"</span></p><p><strong>Last Name: </strong><span>" +
|
||||
itemData.info.lastname +
|
||||
"</span></p><p><strong>Birth Date: </strong><span>" +
|
||||
itemData.info.birthdate +
|
||||
"</span></p>"
|
||||
);
|
||||
} else if (itemData.name == "lawyerpass") {
|
||||
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
|
||||
$(".item-info-description").html(
|
||||
"<p><strong>Pass-ID: </strong><span>" +
|
||||
itemData.info.id +
|
||||
"</span></p><p><strong>First Name: </strong><span>" +
|
||||
itemData.info.firstname +
|
||||
"</span></p><p><strong>Last Name: </strong><span>" +
|
||||
itemData.info.lastname +
|
||||
"</span></p><p><strong>CSN: </strong><span>" +
|
||||
itemData.info.citizenid +
|
||||
"</span></p>"
|
||||
);
|
||||
} else if (itemData.name == "harness") {
|
||||
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
|
||||
$(".item-info-description").html(
|
||||
"<p>" + itemData.info.uses + " uses left.</p>"
|
||||
);
|
||||
} else if (itemData.name == "weapontint_url") {
|
||||
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
|
||||
$(".item-info-description").html(
|
||||
"<p><strong>Tint status: </strong><span> " +
|
||||
(itemData.info.urltint !== undefined ? "Used" : "Without use") +
|
||||
"</span></p><p><strong>URL Link: </strong><span>" +
|
||||
(itemData.info.urltint !== undefined ? itemData.info.urltint.substring(0, 40) + "..." : "N/A") +
|
||||
"</span></p>"
|
||||
);
|
||||
} else if (itemData.type == "weapon") {
|
||||
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
|
||||
if (itemData.info.ammo == undefined) {
|
||||
itemData.info.ammo = 0;
|
||||
} else {
|
||||
itemData.info.ammo != null ? itemData.info.ammo : 0;
|
||||
}
|
||||
if (itemData.info.attachments != null) {
|
||||
var attachmentString = "";
|
||||
$.each(itemData.info.attachments, function (i, attachment) {
|
||||
if (i == itemData.info.attachments.length - 1) {
|
||||
attachmentString += attachment.label;
|
||||
} else {
|
||||
attachmentString += attachment.label + ", ";
|
||||
}
|
||||
});
|
||||
$(".item-info-description").html(
|
||||
"<p><strong>Serial Number: </strong><span>" +
|
||||
itemData.info.serie +
|
||||
"</span></p><p><strong>Munition: </strong><span>" +
|
||||
itemData.info.ammo +
|
||||
"</span></p><p><strong>Attachments: </strong><span>" +
|
||||
attachmentString +
|
||||
"</span></p>"
|
||||
);
|
||||
} else {
|
||||
$(".item-info-description").html(
|
||||
"<p><strong>Serial Number: </strong><span>" +
|
||||
itemData.info.serie +
|
||||
"</span></p><p><strong>Munition: </strong><span>" +
|
||||
itemData.info.ammo +
|
||||
"</span></p><p>" +
|
||||
itemData.description +
|
||||
"</p>"
|
||||
);
|
||||
}
|
||||
} else if (itemData.name == "filled_evidence_bag") {
|
||||
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
|
||||
if (itemData.info.type == "casing") {
|
||||
$(".item-info-description").html(
|
||||
"<p><strong>Evidence material: </strong><span>" +
|
||||
itemData.info.label +
|
||||
"</span></p><p><strong>Type number: </strong><span>" +
|
||||
itemData.info.ammotype +
|
||||
"</span></p><p><strong>Caliber: </strong><span>" +
|
||||
itemData.info.ammolabel +
|
||||
"</span></p><p><strong>Serial Number: </strong><span>" +
|
||||
itemData.info.serie +
|
||||
"</span></p><p><strong>Crime scene: </strong><span>" +
|
||||
itemData.info.street +
|
||||
"</span></p><br /><p>" +
|
||||
itemData.description +
|
||||
"</p>"
|
||||
);
|
||||
|
||||
} else if (itemData.info.type == "blood") {
|
||||
$(".item-info-description").html(
|
||||
"<p><strong>Evidence material: </strong><span>" +
|
||||
itemData.info.label +
|
||||
"</span></p><p><strong>Blood type: </strong><span>" +
|
||||
itemData.info.bloodtype +
|
||||
"</span></p><p><strong>DNA Code: </strong><span>" +
|
||||
itemData.info.dnalabel +
|
||||
"</span></p><p><strong>Crime scene: </strong><span>" +
|
||||
itemData.info.street +
|
||||
"</span></p><br /><p>" +
|
||||
itemData.description +
|
||||
"</p>"
|
||||
);
|
||||
} else if (itemData.info.type == "fingerprint") {
|
||||
$(".item-info-description").html(
|
||||
"<p><strong>Evidence material: </strong><span>" +
|
||||
itemData.info.label +
|
||||
"</span></p><p><strong>Fingerprint: </strong><span>" +
|
||||
itemData.info.fingerprint +
|
||||
"</span></p><p><strong>Crime Scene: </strong><span>" +
|
||||
itemData.info.street +
|
||||
"</span></p><br /><p>" +
|
||||
itemData.description +
|
||||
"</p>"
|
||||
);
|
||||
} else if (itemData.info.type == "dna") {
|
||||
$(".item-info-description").html(
|
||||
"<p><strong>Evidence material: </strong><span>" +
|
||||
itemData.info.label +
|
||||
"</span></p><p><strong>DNA Code: </strong><span>" +
|
||||
itemData.info.dnalabel +
|
||||
"</span></p><br /><p>" +
|
||||
itemData.description +
|
||||
"</p>"
|
||||
);
|
||||
}
|
||||
} else if (
|
||||
itemData.info.costs != undefined &&
|
||||
itemData.info.costs != null
|
||||
) {
|
||||
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
|
||||
$(".item-info-description").html("<p>" + itemData.info.costs + "</p>");
|
||||
} else if (itemData.name == "stickynote") {
|
||||
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
|
||||
$(".item-info-description").html("<p>" + itemData.info.label + "</p>");
|
||||
} else if (itemData.name == "moneybag") {
|
||||
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
|
||||
$(".item-info-description").html(
|
||||
"<p><strong>Amount of cash: </strong><span>$" +
|
||||
itemData.info.cash +
|
||||
"</span></p>"
|
||||
);
|
||||
} else if (itemData.name == "cash") {
|
||||
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
|
||||
$(".item-info-description").html(
|
||||
"<p><strong>" + Lang('INVENTORY_NUI_OPTION_AMOUNT') + ": </strong><span>$" +
|
||||
itemData.amount +
|
||||
"</span></p>"
|
||||
);
|
||||
} else if (itemData.name == "money") {
|
||||
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
|
||||
$(".item-info-description").html(
|
||||
"<p><strong>" + Lang('INVENTORY_NUI_OPTION_AMOUNT') + ": </strong><span>$" +
|
||||
itemData.amount +
|
||||
"</span></p>"
|
||||
);
|
||||
} else if (itemData.name == "markedbills") {
|
||||
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
|
||||
$(".item-info-description").html(
|
||||
"<p><strong>" + Lang('INVENTORY_NUI_OPTION_AMOUNT') + ": </strong><span>$" +
|
||||
itemData.info.worth +
|
||||
"</span></p>"
|
||||
);
|
||||
} else if (itemData.name == "visa" || itemData.name == "creditcard") {
|
||||
$(".item-info-title").html('<p>' + label + '</p>')
|
||||
var str = "" + itemData.info.cardNumber + "";
|
||||
var res = str.slice(12);
|
||||
var cardNumber = "************" + res;
|
||||
$(".item-info-description").html('<p><strong>Card Owner: </strong><span>' + itemData.info.ownerName + '</span></p><p><strong>Card Type: </strong><span>' + itemData.info.cardType + '</span></p><p><strong>Card Number: </strong><span>' + cardNumber + '</span></p>');
|
||||
} else if (itemData.name == "motelkey" && itemData.info) {
|
||||
$(".item-info-title").html('<p>' + label + '</p>')
|
||||
$(".item-info-description").html('<p>Motel Key: ' + itemData.info.motel + '</p>');
|
||||
} else if (itemData.name == "labkey") {
|
||||
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
|
||||
$(".item-info-description").html("<p>Lab: " + itemData.info.lab + "</p>");
|
||||
} else if (itemData.name == "ls_liquid_meth" || itemData.name == "ls_meth") {
|
||||
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
|
||||
$(".item-info-description").html(
|
||||
"<p><strong>Strain: </strong><span>" +
|
||||
itemData.info.strain +
|
||||
"</span></p><p><strong>Purity: </strong><span>" +
|
||||
itemData.info.purity +
|
||||
"%</span></p>"
|
||||
);
|
||||
} else if (itemData.name == "ls_ammonia" || itemData.name == "ls_iodine" || itemData.name == "ls_acetone") {
|
||||
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
|
||||
$(".item-info-description").html(
|
||||
"<p><strong>Remaining: </strong><span>" +
|
||||
itemData.info.quality +
|
||||
"%</span></p>"
|
||||
);
|
||||
} else {
|
||||
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
|
||||
$(".item-info-description").html("<p>" + itemData.description + "</p>");
|
||||
}
|
||||
|
||||
} else {
|
||||
$(".item-info-title").html("<p>" + itemData.label + "</p>");
|
||||
$(".item-info-description").html("<p>" + itemData.description + "</p>");
|
||||
}
|
||||
}
|
||||
|
||||
const tableToString = (data) => {
|
||||
let table = '<table class="table table-striped table-dark">';
|
||||
for (const [key, value] of Object.entries(data)) {
|
||||
table += `<tr><td>${key}</td><td>${value}</td></tr>`;
|
||||
}
|
||||
table += '</table>';
|
||||
return table;
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Quasar Store · Configuration Guidelines
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- This configuration file defines all adjustable parameters for the script.
|
||||
-- Comments are standardized to help you identify which sections you can safely edit.
|
||||
--
|
||||
-- • [EDIT] – Safe for users to modify. Adjust these values as needed.
|
||||
-- • [INFO] – Informational note describing what the variable or block does.
|
||||
-- • [ADV] – Advanced settings. Change only if you understand the logic behind it.
|
||||
-- • [CORE] – Core functionality. Do not modify unless you are a developer.
|
||||
-- • [AUTO] – Automatically handled by the system. Never edit manually.
|
||||
--
|
||||
-- Always make a backup before editing configuration files.
|
||||
-- Incorrect changes in [CORE] or [AUTO] sections can break the resource.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Seller Configuration [EDIT]
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- [INFO] Defines in-game stores and seller NPCs, including item lists, prices,
|
||||
-- payment accounts, and map blip settings. Each entry represents a store
|
||||
-- with its own location, available items, and visual configuration.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.SellItems = {
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────
|
||||
-- Seller NPC Configuration [EDIT]
|
||||
--──────────────────────────────────────────────────────────────────────────
|
||||
['Seller item'] = {
|
||||
coords = vec3(2682.7588, 3284.8857, 55.2103), -- [EDIT] Store location on map
|
||||
|
||||
blip = { -- [EDIT] Map blip configuration
|
||||
active = true, -- [EDIT] Enables or disables visibility
|
||||
name = 'Seller', -- [EDIT] Blip title displayed on the map
|
||||
sprite = 89, -- [EDIT] Blip icon ID
|
||||
color = 1, -- [EDIT] Color of the blip
|
||||
scale = 0.5, -- [EDIT] Blip icon size
|
||||
account = 'money', -- [EDIT] Payment source ('money', 'bank', etc.)
|
||||
},
|
||||
|
||||
items = { -- [EDIT] Items available for sale
|
||||
{
|
||||
name = 'sandwich',
|
||||
price = 3,
|
||||
amount = 1,
|
||||
info = {},
|
||||
type = 'item',
|
||||
slot = 1,
|
||||
},
|
||||
{
|
||||
name = 'tosti',
|
||||
price = 2,
|
||||
amount = 1,
|
||||
info = {},
|
||||
type = 'item',
|
||||
slot = 2,
|
||||
},
|
||||
{
|
||||
name = 'water_bottle',
|
||||
price = 2,
|
||||
amount = 1,
|
||||
info = {},
|
||||
type = 'item',
|
||||
slot = 3,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────
|
||||
-- 24/7 Store Configuration [EDIT]
|
||||
--──────────────────────────────────────────────────────────────────────────
|
||||
['24/7'] = {
|
||||
coords = vec3(2679.9326, 3276.6897, 54.4058), -- [EDIT] Store location
|
||||
|
||||
blip = { -- [EDIT] Blip settings for 24/7 store
|
||||
active = true,
|
||||
name = '24/7 Store',
|
||||
sprite = 89,
|
||||
color = 1,
|
||||
scale = 0.5,
|
||||
account = 'money',
|
||||
},
|
||||
|
||||
items = { -- [EDIT] Items sold in this store
|
||||
{
|
||||
name = 'tosti',
|
||||
price = 1,
|
||||
amount = 1,
|
||||
info = {},
|
||||
type = 'item',
|
||||
slot = 1,
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Quasar Store · Configuration Guidelines
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- This configuration file defines all adjustable parameters for the script.
|
||||
-- Comments are standardized to help you identify which sections you can safely edit.
|
||||
--
|
||||
-- • [EDIT] – Safe for users to modify. Adjust these values as needed.
|
||||
-- • [INFO] – Informational note describing what the variable or block does.
|
||||
-- • [ADV] – Advanced settings. Change only if you understand the logic behind it.
|
||||
-- • [CORE] – Core functionality. Do not modify unless you are a developer.
|
||||
-- • [AUTO] – Automatically handled by the system. Never edit manually.
|
||||
--
|
||||
-- Always make a backup before editing configuration files.
|
||||
-- Incorrect changes in [CORE] or [AUTO] sections can break the resource.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Storage Containers [EDIT]
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- [INFO] Defines items that act as physical containers capable of holding other items.
|
||||
-- Example: a cigarette box containing multiple cigarettes.
|
||||
-- Containers have their own weight, slot capacity, and optional default contents.
|
||||
--
|
||||
-- How it works:
|
||||
-- • Define a container item (e.g. 'cigarettebox').
|
||||
-- • Set its internal storage capacity (slots + weight).
|
||||
-- • Optionally preload items inside with metadata and amounts.
|
||||
--
|
||||
-- This feature enhances immersion and realism, especially for roleplay setups.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.Storage = {
|
||||
|
||||
[1] = {
|
||||
name = "cigarettebox", -- [EDIT] Unique name of the container item
|
||||
label = "Cigarette Box", -- [EDIT] Display name in inventory
|
||||
weight = 50, -- [EDIT] Max total weight the container can hold
|
||||
slots = 1, -- [EDIT] Max number of different item types allowed
|
||||
|
||||
items = { -- [EDIT] Default contents of this container
|
||||
[1] = {
|
||||
name = "cigarette", -- [INFO] Item identifier
|
||||
label = "Cigarette", -- [INFO] Display name
|
||||
description = "A single cigarette",-- [INFO] Short description
|
||||
useable = true, -- [EDIT] Can the item be used
|
||||
type = "item", -- [INFO] Inventory type
|
||||
amount = 20, -- [EDIT] Default quantity
|
||||
weight = 1, -- [EDIT] Weight per unit
|
||||
unique = false, -- [EDIT] Unique (non-stackable)
|
||||
slot = 1, -- [INFO] Slot position inside container
|
||||
info = {}, -- [ADV] Metadata or custom data
|
||||
},
|
||||
-- [EDIT] Add more default items here if needed.
|
||||
},
|
||||
},
|
||||
|
||||
-- [EDIT] Add more container definitions below.
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Quasar Store · Configuration Guidelines
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- This configuration file defines all adjustable parameters for the script.
|
||||
-- Comments are standardized to help you identify which sections you can safely edit.
|
||||
--
|
||||
-- • [EDIT] – Safe for users to modify. Adjust these values as needed.
|
||||
-- • [INFO] – Informational note describing what the variable or block does.
|
||||
-- • [ADV] – Advanced settings. Change only if you understand the logic behind it.
|
||||
-- • [CORE] – Core functionality. Do not modify unless you are a developer.
|
||||
-- • [AUTO] – Automatically handled by the system. Never edit manually.
|
||||
--
|
||||
-- Always make a backup before editing configuration files.
|
||||
-- Incorrect changes in [CORE] or [AUTO] sections can break the resource.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Vehicle Configuration System [EDIT]
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- [INFO] Defines storage and access rules for vehicles, including trunk and glovebox.
|
||||
-- Supports ownership checks, police access overrides, and custom vehicle setups.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.IsVehicleOwned = false -- [EDIT] If true, only owned vehicles retain trunk data.
|
||||
Config.UseItemInVehicle = true -- [EDIT] Disable item usage inside vehicles when false.
|
||||
Config.WeaponsOnVehicle = true -- [EDIT] Disable weapon storage in vehicles when false (may affect performance).
|
||||
|
||||
Config.OpenTrunkAll = true -- [EDIT] Allow any player to open any trunk.
|
||||
Config.OpenTrunkPolice = true -- [EDIT] Allow police to bypass trunk restrictions.
|
||||
Config.OpenTrunkPoliceGrade = 0 -- [EDIT] Minimum police grade to open trunks when restricted.
|
||||
|
||||
Config.OpenGloveboxesAll = true -- [EDIT] Allow any player to open any glovebox.
|
||||
Config.OpenGloveboxesPolice = true -- [EDIT] Allow police to bypass glovebox restrictions.
|
||||
Config.OpenGloveboxesPoliceGrade = 0 -- [EDIT] Minimum police grade to open gloveboxes when restricted.
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Vehicle Class Storage Capacities [EDIT]
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- [INFO] Defines weight and slot capacity for gloveboxes and trunks by vehicle class.
|
||||
-- Reference: https://docs.fivem.net/natives/?_0x29439776AAA00A62
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.VehicleClass = {
|
||||
[0] = { glovebox = { maxweight = 100000, slots = 5 }, trunk = { maxweight = 38000, slots = 30 } },
|
||||
[1] = { glovebox = { maxweight = 100000, slots = 5 }, trunk = { maxweight = 50000, slots = 40 } },
|
||||
[2] = { glovebox = { maxweight = 100000, slots = 5 }, trunk = { maxweight = 75000, slots = 50 } },
|
||||
[3] = { glovebox = { maxweight = 100000, slots = 5 }, trunk = { maxweight = 42000, slots = 35 } },
|
||||
[4] = { glovebox = { maxweight = 100000, slots = 5 }, trunk = { maxweight = 38000, slots = 30 } },
|
||||
[5] = { glovebox = { maxweight = 100000, slots = 5 }, trunk = { maxweight = 30000, slots = 25 } },
|
||||
[6] = { glovebox = { maxweight = 100000, slots = 5 }, trunk = { maxweight = 30000, slots = 25 } },
|
||||
[7] = { glovebox = { maxweight = 100000, slots = 5 }, trunk = { maxweight = 30000, slots = 25 } },
|
||||
[8] = { glovebox = { maxweight = 100000, slots = 5 }, trunk = { maxweight = 15000, slots = 15 } },
|
||||
[9] = { glovebox = { maxweight = 100000, slots = 5 }, trunk = { maxweight = 60000, slots = 35 } },
|
||||
[10] = { glovebox = { maxweight = 100000, slots = 5 }, trunk = { maxweight = 60000, slots = 35 } },
|
||||
[11] = { glovebox = { maxweight = 100000, slots = 5 }, trunk = { maxweight = 60000, slots = 35 } },
|
||||
[12] = { glovebox = { maxweight = 100000, slots = 5 }, trunk = { maxweight = 120000, slots = 35 } },
|
||||
[13] = { glovebox = { maxweight = 100000, slots = 5 }, trunk = { maxweight = 0, slots = 0 } },
|
||||
[14] = { glovebox = { maxweight = 100000, slots = 5 }, trunk = { maxweight = 120000, slots = 50 } },
|
||||
[15] = { glovebox = { maxweight = 100000, slots = 5 }, trunk = { maxweight = 120000, slots = 50 } },
|
||||
[16] = { glovebox = { maxweight = 100000, slots = 5 }, trunk = { maxweight = 120000, slots = 50 } },
|
||||
[17] = { glovebox = { maxweight = 100000, slots = 5 }, trunk = { maxweight = 120000, slots = 50 } },
|
||||
[18] = { glovebox = { maxweight = 100000, slots = 5 }, trunk = { maxweight = 120000, slots = 50 } },
|
||||
[19] = { glovebox = { maxweight = 100000, slots = 5 }, trunk = { maxweight = 120000, slots = 50 } },
|
||||
[20] = { glovebox = { maxweight = 100000, slots = 5 }, trunk = { maxweight = 120000, slots = 50 } },
|
||||
}
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Custom Vehicle Storage (Model Overrides) [EDIT]
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- [INFO] Defines specific trunk/glovebox capacities for individual models, overriding class values.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.CustomTrunk = {
|
||||
[joaat('adder')] = { slots = 5, maxweight = 100000 },
|
||||
}
|
||||
|
||||
Config.CustomGlovebox = {
|
||||
[joaat('adder')] = { slots = 5, maxweight = 100000 },
|
||||
}
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Front Trunk (Rear Engine Vehicles) [EDIT]
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- [INFO] For vehicles with rear engines, defines models where trunk is accessed from the front.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.BackEngineVehicles = {
|
||||
[`ninef`] = true,
|
||||
[`adder`] = true,
|
||||
[`vagner`] = true,
|
||||
[`t20`] = true,
|
||||
[`infernus`] = true,
|
||||
[`zentorno`] = true,
|
||||
[`reaper`] = true,
|
||||
[`comet2`] = true,
|
||||
[`comet3`] = true,
|
||||
[`jester`] = true,
|
||||
[`jester2`] = true,
|
||||
[`cheetah`] = true,
|
||||
[`cheetah2`] = true,
|
||||
[`prototipo`] = true,
|
||||
[`turismor`] = true,
|
||||
[`pfister811`] = true,
|
||||
[`ardent`] = true,
|
||||
[`nero`] = true,
|
||||
[`nero2`] = true,
|
||||
[`tempesta`] = true,
|
||||
[`vacca`] = true,
|
||||
[`bullet`] = true,
|
||||
[`osiris`] = true,
|
||||
[`entityxf`] = true,
|
||||
[`turismo2`] = true,
|
||||
[`fmj`] = true,
|
||||
[`re7b`] = true,
|
||||
[`tyrus`] = true,
|
||||
[`italigtb`] = true,
|
||||
[`penetrator`] = true,
|
||||
[`monroe`] = true,
|
||||
[`ninef2`] = true,
|
||||
[`stingergt`] = true,
|
||||
[`surfer`] = true,
|
||||
[`surfer2`] = true,
|
||||
[`gp1`] = true,
|
||||
[`autarch`] = true,
|
||||
[`tyrant`] = true,
|
||||
-- [EDIT] Add more front-trunk vehicles here if needed.
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Quasar Store · Configuration Guidelines
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- This configuration file defines all adjustable parameters for the script.
|
||||
-- Comments are standardized to help you identify which sections you can safely edit.
|
||||
--
|
||||
-- • [EDIT] – Safe for users to modify. Adjust these values as needed.
|
||||
-- • [INFO] – Informational note describing what the variable or block does.
|
||||
-- • [ADV] – Advanced settings. Change only if you understand the logic behind it.
|
||||
-- • [CORE] – Core functionality. Do not modify unless you are a developer.
|
||||
-- • [AUTO] – Automatically handled by the system. Never edit manually.
|
||||
--
|
||||
-- Always make a backup before editing configuration files.
|
||||
-- Incorrect changes in [CORE] or [AUTO] sections can break the resource.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Vending Machine Configuration [EDIT]
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- [INFO] Defines vending machine categories, their available items, and prop models.
|
||||
-- Each category can contain multiple items with prices and stock amounts.
|
||||
-- Machines link to these categories by model name for contextual interaction.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.VendingMachines = {
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────
|
||||
-- Drinks Category [EDIT]
|
||||
--──────────────────────────────────────────────────────────────────────────
|
||||
['drinks'] = {
|
||||
Label = 'Drinks',
|
||||
Items = {
|
||||
[1] = {
|
||||
name = 'kurkakola', -- [INFO] Drink item name
|
||||
price = 4, -- [EDIT] Item price
|
||||
amount = 50, -- [EDIT] Stock quantity
|
||||
info = {}, -- [ADV] Metadata
|
||||
type = 'item', -- [INFO] Type of entry
|
||||
slot = 1, -- [INFO] Slot index in menu
|
||||
},
|
||||
[2] = {
|
||||
name = 'water_bottle',
|
||||
price = 4,
|
||||
amount = 50,
|
||||
info = {},
|
||||
type = 'item',
|
||||
slot = 2,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────
|
||||
-- Candy Category [EDIT]
|
||||
--──────────────────────────────────────────────────────────────────────────
|
||||
['candy'] = {
|
||||
Label = 'Candy',
|
||||
Items = {
|
||||
[1] = {
|
||||
name = 'chocolate', -- [INFO] Candy item
|
||||
price = 4, -- [EDIT] Item price
|
||||
amount = 50, -- [EDIT] Stock
|
||||
info = {},
|
||||
type = 'item',
|
||||
slot = 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────
|
||||
-- Coffee Category [EDIT]
|
||||
--──────────────────────────────────────────────────────────────────────────
|
||||
['coffee'] = {
|
||||
Label = 'Coffee',
|
||||
Items = {
|
||||
[1] = {
|
||||
name = 'coffee', -- [INFO] Coffee item
|
||||
price = 4,
|
||||
amount = 50,
|
||||
info = {},
|
||||
type = 'item',
|
||||
slot = 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────
|
||||
-- Water Category [EDIT]
|
||||
--──────────────────────────────────────────────────────────────────────────
|
||||
['water'] = {
|
||||
Label = 'Water',
|
||||
Items = {
|
||||
[1] = {
|
||||
name = 'water_bottle', -- [INFO] Water bottle item
|
||||
price = 4,
|
||||
amount = 50,
|
||||
info = {},
|
||||
type = 'item',
|
||||
slot = 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- Vending Machine Models [EDIT]
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
-- [INFO] Lists vending machine props and links them to a category defined above.
|
||||
-- Allows interaction with corresponding items based on prop model type.
|
||||
--──────────────────────────────────────────────────────────────────────────────
|
||||
Config.Vendings = {
|
||||
[1] = { Model = 'prop_vend_coffe_01', Category = 'coffee' },
|
||||
[2] = { Model = 'prop_vend_water_01', Category = 'water' },
|
||||
[3] = { Model = 'prop_watercooler', Category = 'water' },
|
||||
[4] = { Model = 'prop_watercooler_Dark', Category = 'water' },
|
||||
[5] = { Model = 'prop_vend_snak_01', Category = 'candy' },
|
||||
[6] = { Model = 'prop_vend_snak_01_tu', Category = 'candy' },
|
||||
[7] = { Model = 'prop_vend_fridge01', Category = 'drinks' },
|
||||
[8] = { Model = 'prop_vend_soda_01', Category = 'drinks' },
|
||||
[9] = { Model = 'prop_vend_soda_02', Category = 'drinks' },
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user