CONFIG
Here is the configuration file for Snazz Trader. The file is the same for both ESX and QB-Core.
Config = {}
-- Variables
local second = 1
local minute = 60
local hour = 3600
Config.Framework = "qb" -- "qb" or "esx"
Config.Target = false -- Using QB-Target, true or false (QB Only)
Config.AlertNearby = true -- Alert the player if there is a trader nearby
Config.AlertDistance = 15.0 -- Distance between the closest trader and the player to call the alert
Config.CommandEnabled = true -- Enable or disable command to display trader timing
Config.Command = "trader" -- Command the player will use to display trader timing
Config.MoneyType = "bank"
--[[
ESX: 'money' = Cash, 'bank' = Bank, 'dirty' = Dirty Money
QB-Core: 'cash' = Cash, 'bank' = Bank, 'crypto' = Cryptocurrency
--]]
Config.TraderOptions = {
TraderPosition = vector4(376.96, 3569.15, 33.29, 77.52), -- Vector4 format
TraderModel = "a_m_m_ktown_01", -- https://docs.fivem.net/docs/game-references/ped-models/
TimingConfiguration = {
TimeToSpawn = 10 * second, -- Amount of time it takes for the Trader to spawn
TimeAvailable = 10 * second -- Amount of time the Trader will be available for
},
TraderBuyEnabled = true, -- Enable or disable the buying option in the menu
TraderBuyOptions = {
-- Label: What will be shown on the menu as the name of the item
-- Item: What the item is called in the database
-- Price: How much the item cost to buy
-- isWeapon: True/False (Is the item a weapon e.g. pistol)
{label = "Sandwich", item = "sandwich", price = 1000, isWeapon = false},
{label = "Water Bottle", item = "water", price = 300, isWeapon = false},
{label = "Assault Rifle", item = "WEAPON_ASSAULTRIFLE", price = 300, isWeapon = true}
},
TraderSellEnabled = true, -- Enable or disable the selling option in the menu
TraderSellOptions = {
-- Label: What will be shown on the menu as the name of the item
-- Item: What the item is called in the database
-- Price: How much the item cost to sell
-- isWeapon: True/False (Is the item a weapon e.g. pistol)
{label = "Sandwich", item = "sandwich", price = 1000, isWeapon = false},
{label = "Water Bottle", item = "water", price = 300, isWeapon = false},
{label = "Assault Rifle", item = "WEAPON_ASSAULTRIFLE", price = 300, isWeapon = true}
}
}
Config.MenuOptions = {
Header = "Snazz Trader",
BuyButton = "Buy Items",
SellButton = "Sell Items",
}
Config.Discord = false -- Enable or disable discord webhooks (put your webhook in server/discord.lua)
Config.Debug = false -- Only enable if asked to by Discord support
Last updated