Distributions
Configuration
Configuration guide for player owned distributions
Config file
config.lua
--[[
📜 fs-distribution - Fusion Scripts
🔗 fusionscripts.xyz | 💬 discord.gg/fusionscripts
]]--
FSConfig = {}
FSConfig.Locale = 'en'
FSConfig.imageDir = 'ox_inventory/web/images/' -- The directory where the images are stored.
FSConfig.ui = {
colors = {
primary = '#528AD7', -- Defaults to blue
primarylight = '#82B5E3', -- Defaults to light blue
accent = '#FF8563', -- Defaults to orange
accentlight = '#FFB399', -- Defaults to light orange
}
}
FSConfig.moneyType = 'bank'
FSConfig.currency = { -- change symbol in locales
name = 'USD',
country = 'en-US'
}
FSConfig.sellDistribution = {
priceMultiplier = 0.6, -- the price multiplier for selling the distribution
}
FSConfig.shells = {
{
model = 'fs-warehouse',
name = 'Default Warehouse',
entry = {
coords = vector3(-0.027, -5.172, 1.6),
heading = 2.9,
},
objects = {
{
prop = 'v_ind_dc_desk03',
offset = vector3(-3.823, -2.369, 0.6),
heading = 270.0,
},
{
prop = 'prop_laptop_01a',
offset = vector3(-3.823, -2.369, 1.4),
heading = 100.0,
isLaptop = true,
},
}
}
}
FSConfig.upgrades = {
customerRelations = {
base = 1.0, -- the base multiplier for the sale multiplier
levels = {
{
name = 'Level 1',
price = 10000,
saleMultiplier = 1.2,
},
{
name = 'Level 2',
price = 50000,
saleMultiplier = 1.4,
},
{
name = 'Level 3',
price = 80000,
saleMultiplier = 1.6,
}
}
},
supplierRelations = { -- base is level 0 items
levels = {
{
name = 'Level 1',
price = 10000,
},
{
name = 'Level 2',
price = 75000,
},
{
name = 'Level 3',
price = 100000,
}
}
},
stockRoom = {
base = 50, -- the base amount of items the stock room can hold
levels = {
{
name = 'Level 1',
price = 10000,
totalItems = 100
},
{
name = 'Level 2',
price = 75000,
totalItems = 200
},
{
name = 'Level 3',
price = 100000,
totalItems = 300
}
}
},
deliveryVehicle = {
base = 'bobcatXL', -- the base vehicle for the delivery job
levels = {
{
name = 'Level 1',
price = 10000,
vehicle = 'rumpo',
},
{
name = 'Level 2',
price = 50000,
vehicle = 'boxville',
},
{
name = 'Level 3',
price = 100000,
vehicle = 'benson',
}
}
}
}
FSConfig.orders = {
timer = 3, -- time in seconds per item
checkInterval = 10000, -- time in ms to check for orders, recommended to be 10 seconds or more
}
FSConfig.deliveries = {
refreshInterval = 1, -- time in minutes to refresh the deliveries
amountPerCategory = { -- amount of available deliveries per category (global)
min = 3,
max = 6
},
itemAmounts = {
min = 5,
max = 25
},
itemVariety = {
min = 1,
max = 3
},
rewardsPerItem = {
min = 100,
max = 200
}
}
FSConfig.deliveryLocations = {
{
name = 'Gabrielas market',
coords = vector3(1144.6744, -299.1635, 68.9088),
types = {'groceries'}
},
{
name = 'Liquor store',
coords = vector3(1144.6744, -299.1635, 68.9088),
types = {'liquor'}
},
{
name = 'Hardware store',
coords = vector3(1144.6744, -299.1635, 68.9088),
types = {'hardware', 'groceries'}
},
}
Open source files
--[[
📜 fs-distribution - Fusion Scripts
🔗 fusionscripts.xyz | 💬 discord.gg/fusionscripts
]]--
function getLocale(key)
local localeTable = Locales[FSConfig.Locale or 'en']
if not localeTable then return 'locale not found for ' .. key end
return localeTable[key] or 'locale not found for ' .. key
end
--[[
📜 fs-distribution - Fusion Scripts
🔗 fusionscripts.xyz | 💬 discord.gg/fusionscripts
]]--
function addTarget(entity, options)
if TARGET then --ox-target
TARGET:addLocalEntity(entity, {
label = options.label or 'error',
icon = options.icon or 'fas fa-exclamation-triangle',
name = options.name or 'error',
distance = options.distance or 2.0,
onSelect = options.onSelect or function() end,
})
elseif QBTARGET then -- qb-target
exports['qb-target']:AddTargetEntity(entity, {
options = {
{
label = options.label or 'error',
icon = options.icon or 'fas fa-exclamation-triangle',
targeticon = options.targeticon or 'fas fa-exclamation-triangle',
action = options.onSelect or function() end,
}
},
distance = options.distance or 2.0,
})
end
end
function getLocale(key)
local localeTable = Locales[FSConfig.Locale or 'en']
if not localeTable then return 'locale not found for ' .. key end
return localeTable[key] or 'locale not found for ' .. key
end