Config settings
Config = {}
Config.Debug = true -- Set to true if you want to see debug messages
Config.Framework = "qb"
--[[
Supported Frameworks:
• esx | https://github.com/esx-framework/esx-legacy
• qb | https://github.com/qbcore-framework/qb-core
]]
Config.FrameworkEvents = { -- Change these events if you changed their name in your framework script
esx = {
resource_name = 'es_extended',
main = 'esx:getSharedObject',
load = 'esx:playerLoaded',
job = 'esx:setJob'
},
qbcore = {
resource_name = 'qb-core',
main = 'QBCore:GetObject',
load = 'QBCore:Client:OnPlayerLoaded',
job = 'QBCore:Client:OnJobUpdate',
gang = 'QBCore:Client:OnGangUpdate',
}
}
Config.Notifications = "qb"
--[[
Supported Notifications:
• esx
• qb
• okokNotify
• pNotify
• ps-ui
]]
Config.ImageSource = "nui://qb-inventory/html/images/" -- Location of items images - leave empty if you want to upload images to this script folder
Config.OpenMenuKey = 51 -- Interaction key from https://docs.fivem.net/docs/game-references/controls/
Config.TradeCooldown = 0 -- How long should a player wait after making another trade? (in seconds), 0 for no cooldown
Config.MaxInventoryWeight = 120000 -- ⚠️QB ONLY⚠️ Has to be the same as Config.MaxInventoryWeight in qb-inventory script
Config.UseQBTarget = true -- ⚠️QB ONLY⚠️ Whether use QB-Target to interact with traders
Config.UseVoiceSpeech = true -- Set to false if you don't want trader to say "Hi" when opening Trade Menu
Config.Traders = {
{
coords = vector3(-714.34, 5763.21, 17.33), -- Trader coords
spawnPed = true, -- Set to false if you don't want to create a trader ped and instead use a marker. Can't be "false" if Config.UseQBTarget is set to "true"
pedModel = "a_f_m_beach_01", -- Ped model from https://docs.fivem.net/docs/game-references/ped-models/ - leave empty if "spawnPed" is set to "false"
pedHeading = 65.0, -- Trader heading - don't touch if "spawnPed" is set to "false"
range = 1.5, -- From how far the player can open Trade Menu
whitelistedJobs = {"gang", "mafia", "ballas"}, -- Only these jobs will be able to open Trade Menu
blacklistedJobs = { }, -- These jobs won't be able to open Trade Menu - Leave both empty if you want everyone to be able to open Trade Menu
--@param give string name of the item you will give during the trade
--@param giveLabel string name of the item that will appear on screen when hovering mouse over item image
--@param giveAmount number item amount that you will give during the trade
--@param giveType string "item" or "weapon" depending on what you give
--@param take string name of the item you will get during the trade
--@param takeLabel string name of the item that will appear on screen when hovering mouse over item image
--@param takeAmount number item amount that you will get after the trade
--@param takeType string "item" or "weapon" depending on what you will get
offers = { -- ⚠️Maximum 5 offers per trader⚠️
{give = 'wine', giveLabel = 'Wine', giveAmount = 5, giveType = 'item', take = 'sandwich', takeLabel = 'Sandwich', takeAmount = 1, takeType = 'item'}, -- For 5 breads you will get 1 water
{give = 'WEAPON_PISTOL', giveLabel = 'Pistol', giveAmount = 2, giveType = 'weapon', take = 'lighter', takeLabel = 'Lighter', takeAmount = 2, takeType = 'item'}, -- For 1 Pistol you will get 1 Vintage Pistol
{give = 'lighter', giveLabel = 'Lighter', giveAmount = 2, giveType = 'item', take = 'WEAPON_VINTAGEPISTOL', takeLabel = 'Vintage Pistol', takeAmount = 2, takeType = 'weapon'}, -- For 15 Meth you will get 25 Weed
{give = 'stickynote', giveLabel = 'Sticky note', giveAmount = 10, giveType = 'item', take = 'drill', takeLabel = 'Drill', takeAmount = 1, takeType = 'item'},
{give = 'visacard', giveLabel = 'Visa Card', giveAmount = 3, giveType = 'item', take = 'labkey', takeLabel = 'Lab Key', takeAmount = 5, takeType = 'item'},
}
},
{
coords = vector3(-712.44, 5768.09, 17.33),
spawnPed = true,
pedModel = "a_m_m_eastsa_01",
pedHeading = 65.0,
range = 1.5,
whitelistedJobs = {"gang", "mafia", "ballas"},
blacklistedJobs = { },
offers = {
{give = 'moneybag', giveLabel = 'Moneybag', giveAmount = 5, giveType = 'item', take = 'phone', takeLabel = 'Phone', takeAmount = 1, takeType = 'item'}, -- For 5 breads you will get 1 water
{give = 'fitbit', giveLabel = 'FitBit', giveAmount = 6, giveType = 'item', take = 'firstaid', takeLabel = 'First Aid Kit', takeAmount = 2, takeType = 'item'},
}
}
}
Language = { -- CHANGE ONLY RIGHT SIDE (leave everything in brackets as it is)
["PRESS_KEY"] = "Press [~g~E~s~] to open Trade Menu",
["SEE_OFFERS"] = "SEE OFFERS",
["NO_PERMISSION"] = "You can't trade here!",
["TRADER"] = "TRADER",
["TRADER_TITLE"] = "ITEMS EXCHANGE",
["OFFER"] = "OFFER",
["FINALIZE_TRADE"] = "FINALIZE TRADE?",
["YES"] = "YES",
["NO"] = "NO",
["NOT_ENOUGH_ITEMS"] = "You don't have enough items to make this trade!",
["NOT_ENOUGH_SPACE"] = "You don't have enough space in your inventory!",
["SUCCESS"] = "You have successfully made a trade!",
["COOLDOWN"] = "You have to wait %s seconds before making another trade!"
}
-- ⚠️DON'T TOUCH THIS⚠️
function L(id) if Language[id] then return Language[id] else return "MISSING LOCALE ("..id..")" end end
Config.DiscordWebhook = "" -- Leave empty if you don't want to log every trade to discord
Last updated