Full View config.lua
Preview File Updated: v1.0.8 - 21.10.2024
Config = {}
-- █▀ █▀▄ ▄▀▄ █▄ ▄█ ██▀ █ █ ▄▀▄ █▀▄ █▄▀
-- █▀ █▀▄ █▀█ █ ▀ █ █▄▄ ▀▄▀▄▀ ▀▄▀ █▀▄ █ █
local frameworkAutoFind = function()
if GetResourceState('es_extended') == 'started' then
return "ESX"
elseif GetResourceState('qb-core') == 'started' then
return "QB-Core"
end
end
Config.Core = frameworkAutoFind()
Config.CoreExport = function()
if Config.Core == "ESX" then
return exports['es_extended']:getSharedObject()
elseif Config.Core == "QB-Core" then
return exports['qb-core']:GetCoreObject()
end
end
---@field PlayerLoaded string: ESX: "esx:playerLoaded" / QB-Core: "QBCore:Client:OnPlayerLoaded"
Config.PlayerLoaded = Config.Core == "ESX" and "esx:playerLoaded" or "QBCore:Client:OnPlayerLoaded"
---@field PlayerLogoutServer string: ESX: "esx:playerDropped" / QB-Core: "QBCore:Server:OnPlayerUnload"
Config.PlayerLogoutServer = Config.Core == "ESX" and "esx:playerDropped" or "QBCore:Server:OnPlayerUnload"
---@field PlayerSetJob string: ESX: "esx:setJob" / QB-Core: "QBCore:Client:OnJobUpdate"
Config.PlayerSetJob = Config.Core == "ESX" and "esx:setJob" or "QBCore:Client:OnJobUpdate"
Config.Notification = function(message, time, type)
if type == "success" then
if GetResourceState("vms_notify") == 'started' then
exports['vms_notify']:Notification("STORE", message, time, "#36f230", "fa-solid fa-shop")
else
TriggerEvent('esx:showNotification', message)
TriggerEvent('QBCore:Notify', message, 'success', time)
end
elseif type == "error" then
if GetResourceState("vms_notify") == 'started' then
exports['vms_notify']:Notification("STORE", message, time, "#f23030", "fa-solid fa-shop")
else
TriggerEvent('esx:showNotification', message)
TriggerEvent('QBCore:Notify', message, 'error', time)
end
elseif type == "info" then
if GetResourceState("vms_notify") == 'started' then
exports['vms_notify']:Notification("STORE", message, time, "#4287f5", "fa-solid fa-shop")
else
TriggerEvent('esx:showNotification', message)
TriggerEvent('QBCore:Notify', message, 'primary', time)
end
elseif type == "police_notify" then
if GetResourceState("vms_notify") == 'started' then
exports['vms_notify']:Notification("STORE ROBBERY", message, 10000, "#2499ff", "fa-solid fa-user-secret")
else
TriggerEvent('esx:showNotification', message)
TriggerEvent('QBCore:Notify', message, 'primary', 10000)
end
end
end
Config.Interact = {
Enabled = false,
Open = function(message)
exports["interact"]:Open("E", message) -- Here you can use your TextUI or use my free one - https://github.com/vames-dev/interact
end,
Close = function()
exports["interact"]:Close() -- Here you can use your TextUI or use my free one - https://github.com/vames-dev/interact
end
}
Config.Hud = {
Enable = function()
if GetResourceState('vms_hud') ~= 'missing' then
exports['vms_hud']:Display(true)
end
end,
Disable = function()
if GetResourceState('vms_hud') ~= 'missing' then
exports['vms_hud']:Display(false)
end
end
}
-- @UseProgressbar: If you want to use a progress-bar for the exercises you are doing, you can do so below.
Config.UseProgressbar = true -- (config.client.lua - CL.Progressbar)
-- @UseTarget: Do you want to use target system
Config.UseTarget = false
Config.TargetResource = 'ox_target' -- Prepared for 'ox_target', 'qb-target', 'qtarget' (config.client.lua - CL.Target)
Config.UseMarkers = true -- Using a marker to display points
Config.UseText3D = false -- Using a 3D Text to display points
Config.UseHelpNotify = true -- Using a ESX.ShowHelpNotification (only for esx)
-- @AutoExecuteQuery: Automatic execution of the creation of the vms_business table in database
Config.AutoExecuteQuery = true
-- @DebugPolyZone: Option only for developers to recognize the registration of polyzone store object, and facilitate the creation of new
Config.DebugPolyZone = false
Config.MaxItemsWithoutBasket = 20
Config.MaxItemsInBasket = 100
Config.DisableRunWithBoxInHands = true
-- @StoresLimitPerPlayer: Limit of stores to be owned by one player
-- -1 = Unlimited
-- 0 = No player can buy
Config.StoresLimitPerPlayer = -1
-- @RequiredJobToBeHired: Do you want to prevent the employment of a player who has another job, if so, you can require the employment of only the person who has a job for example - unemployed
Config.RequiredJobToBeHired = 'unemployed'
-- @SaveTimeout: Time every time the stores should refresh to save the status or delete it when the liquidation time has passed
Config.SaveTimeout = 2 * 60000
-- @PurchasesTimeout: Prevent multiple purchases of products by the same person so that fiends don't scoop up product sales for their own store
Config.PurchasesTimeout = 3600 -- 3600 seconds = 1 hour
Config.BasketManageKey = 246 -- Y
Config.Marker = {
['products'] = {
distanceSee = 2.75,
distanceAccess = 1.0,
type = 20,
color = {62, 78, 158, 180},
rotation = vec(0.0, 180.0, 0.0),
scale = vec(0.15, 0.15, 0.15),
bobUpAndDown = false,
rotate = true,
},
['buy'] = {
distanceSee = 2.75,
distanceAccess = 1.0,
type = 20,
color = {142, 255, 77, 180},
rotation = vec(0.0, 180.0, 0.0),
scale = vec(0.15, 0.15, 0.15),
bobUpAndDown = false,
rotate = true,
},
['cashier'] = {
distanceSee = 2.75,
distanceAccess = 1.0,
type = 20,
color = {252, 198, 3, 180},
rotation = vec(0.0, 180.0, 0.0),
scale = vec(0.15, 0.15, 0.15),
bobUpAndDown = false,
rotate = true,
},
['basket'] = {
distanceSee = 2.75,
distanceAccess = 1.0,
type = 20,
color = {94, 252, 3, 180},
rotation = vec(0.0, 180.0, 0.0),
scale = vec(0.15, 0.15, 0.15),
bobUpAndDown = false,
rotate = true,
},
['purchase'] = {
distanceSee = 2.75,
distanceAccess = 1.0,
type = 20,
color = {252, 198, 3, 180},
rotation = vec(0.0, 180.0, 0.0),
scale = vec(0.15, 0.15, 0.15),
bobUpAndDown = false,
rotate = true,
},
['management'] = {
distanceSee = 2.75,
distanceAccess = 1.0,
type = 20,
color = {252, 198, 3, 180},
rotation = vec(0.0, 180.0, 0.0),
scale = vec(0.15, 0.15, 0.15),
bobUpAndDown = false,
rotate = true,
},
['destroy_cameras'] = {
distanceSee = 2.75,
distanceAccess = 1.75,
type = 20,
color = {252, 198, 3, 180},
rotation = vec(0.0, 180.0, 0.0),
scale = vec(0.15, 0.15, 0.15),
bobUpAndDown = false,
rotate = true,
},
}
Config.Blips = {
['store'] = {
sprite = 52,
display = 4,
scale = 0.75,
color = 0,
name = "Store"
},
['owned_store'] = {
sprite = 52,
display = 4,
scale = 0.75,
color = 3,
name = "Your Store"
},
['delivery'] = {
sprite = 52,
display = 4,
scale = 1.0,
color = 38,
routeColor = 38,
name = "Delivery"
},
['wholesale'] = {
sprite = 478,
display = 6,
scale = 1.2,
color = 28,
routeColor = 28,
name = "Wholesale"
},
}
Config.Wholesales = {
['A'] = { -- Food
label = 'Wholesale A',
vehicle = "mule3",
products = {
['sandwich'] = {orderPrice = 0.2, orderReward = 0.8},
['hotdog'] = {orderPrice = 0.1, orderReward = 0.5},
['hamburger'] = {orderPrice = 0.2, orderReward = 0.8},
},
points = {
{
coords = vector4(2674.42, 3512.41, 51.95, 67.96),
packs = {
['1'] = { -- Level 1
[1] = {prop = 'prop_cs_rub_box_02', coords = vector4(2681.49, 3506.76, 52.3, 213.29), attachToVeh = {0.5, 0.3, 0.2, -90.0, 0.0, 90.0}},
[2] = {prop = 'prop_cs_rub_box_02', coords = vector4(2682.12, 3507.03, 52.3, 243.78), attachToVeh = {-0.25, 0.3, 0.2, -90.0, 0.0, 90.0}},
[3] = {prop = 'prop_cs_rub_box_02', coords = vector4(2680.96, 3507.4, 52.3, 217.76), attachToVeh = {0.5, -0.6, 0.2, -90.0, 0.0, 90.0}}
},
['2'] = { -- Level 2
[1] = {prop = 'prop_cs_rub_box_01', coords = vector4(2681.49, 3506.76, 52.3, 213.29), attachToVeh = {0.5, 0.3, 0.2, -90.0, 0.0, 90.0}},
[2] = {prop = 'prop_cs_rub_box_01', coords = vector4(2682.12, 3507.03, 52.3, 243.78), attachToVeh = {-0.25, 0.3, 0.2, -90.0, 0.0, 90.0}},
},
['3'] = { -- Level 3
[1] = {prop = 'prop_cs_rub_box_01', coords = vector4(2681.49, 3506.76, 52.3, 213.29), attachToVeh = {0.5, 0.3, 0.2, -90.0, 0.0, 90.0}},
},
}
},
{
coords = vector4(143.06, -3204.24, 5.26, 269.4),
packs = {
['1'] = { -- Level 1
[1] = {prop = 'prop_cs_rub_box_02', coords = vector4(135.72, -3209.38, 4.86, 184.94), attachToVeh = {0.5, 0.3, 0.2, -90.0, 0.0, 90.0}},
[2] = {prop = 'prop_cs_rub_box_02', coords = vector4(134.33, -3210.21, 4.86, 144.76), attachToVeh = {-0.25, 0.3, 0.2, -90.0, 0.0, 90.0}},
[3] = {prop = 'prop_cs_rub_box_02', coords = vector4(132.54, -3208.68, 4.86, 37.83), attachToVeh = {0.5, -0.6, 0.2, -90.0, 0.0, 90.0}}
},
['2'] = { -- Level 2
[1] = {prop = 'prop_cs_rub_box_01', coords = vector4(134.33, -3210.21, 4.86, 144.76), attachToVeh = {0.5, 0.3, 0.2, -90.0, 0.0, 90.0}},
[2] = {prop = 'prop_cs_rub_box_01', coords = vector4(132.54, -3208.68, 4.86, 37.83), attachToVeh = {-0.25, 0.3, 0.2, -90.0, 0.0, 90.0}},
},
['3'] = { -- Level 3
[1] = {prop = 'prop_cs_rub_box_01', coords = vector4(132.54, -3208.68, 4.86, 37.83), attachToVeh = {0.5, 0.3, 0.2, -90.0, 0.0, 90.0}},
},
}
},
},
},
-- [...]
['H'] = { -- Fuel
label = 'Wholesale H',
vehicle = "packer",
trailer = "tanker",
fuel = {orderPrice = 1.0, orderReward = 2},
points = {
{
coords = vector4(1405.8, -2052.72, 52.0, 261.74),
fuelPipe = vector3(1395.09, -2047.25, 52.0),
},
{
coords = vector4(-427.26, -2267.32, 7.61, 89.79),
fuelPipe = vector3(-421.68, -2263.59, 7.61),
},
{
coords = vector4(1310.28, -1910.45, 43.06, 2.75),
fuelPipe = vector3(1316.17, -1913.93, 48.08),
},
},
},
}
Config.ShelvesProducts = {
['food'] = {
["sandwich"] = {name = "sandwich", label = "Sandwich", price = 5, tax = 'products.food'},
["hotdog"] = {name = "hotdog", label = "Hot-Dog", price = 4, tax = 'products.food'},
["hamburger"] = {name = "hamburger", label = "Hamburger", price = 5, tax = 'products.food'},
},
['snacks'] = {
["pq_candy"] = {name = "pq_candy", label = "P's & Q's Candies", price = 4, tax = 'products.food'},
},
['drinks'] = {
["sprunk"] = {name = "sprunk", label = "Sprunk Can", price = 4, tax = 'products.drinks'},
["ecola"] = {name = "ecola", label = "e-Cola Can", price = 4, tax = 'products.drinks'},
["coffee"] = {name = "coffee", label = "Coffee Cup", price = 6, tax = 'products.drinks'},
},
['alcohol'] = {
["logger_beer"] = {name = "logger_beer", label = "Logger Beer", price = 7, tax = 'products.alcohol'},
["patriot_beer"] = {name = "patriot_beer", label = "Patriot Beer", price = 6, tax = 'products.alcohol'},
["piswasser_beer"] = {name = "piswasser_beer", label = "Piswasser Beer", price = 7, tax = 'products.alcohol'},
["themount_whiskey"] = {name = "themount_whiskey", label = "The Mount Whiskey", price = 65, tax = 'products.alcohol'},
["bourgeoix_cognac"] = {name = "bourgeoix_cognac", label = "BOURGEOIX cognac", price = 54, tax = 'products.alcohol'},
["cardiaque_cognac"] = {name = "cardiaque_cognac", label = "Cardiaque Cognac", price = 83, tax = 'products.alcohol'},
["bleuterd_champagne"] = {name = "bleuterd_champagne", label = "BLEUTER'D Champagne", price = 150, tax = 'products.alcohol'},
["bleuterd_champagne2"] = {name = "bleuterd_champagne2", label = "BLEUTER'D Champagne", price = 130, tax = 'products.alcohol'},
},
['fruits'] = {
["apple"] = {name = "apple", label = "Apple", price = 2, tax = 'products.food'},
["orange"] = {name = "orange", label = "Orange", price = 2, tax = 'products.food'},
["pear"] = {name = "pear", label = "Pear", price = 2, tax = 'products.food'},
},
['other'] = {
["rolling_paper"] = {name = "rolling_paper", label = "Rolling Paper", price = 3, tax = 'products.other'},
["lighter"] = {name = "lighter", label = "Lighter", price = 2, tax = 'products.other'},
["fixkit"] = {name = "fixkit", label = "Repair Kit", price = 580, tax = 'products.other'},
["cigarette"] = {name = "cigarette", label = "Cigarette", price = 2, tax = 'products.other'},
},
}
Config.Fuel = {
label = "Fuel",
price = 8,
tax = 'products.fuel'
}
Config.Stores = {
["LTDGasoline_1"] = {
type = 'gasstation',
jobName = 'ltd1',
cityhall_grades = { -- Grades for sections from vms_cityhall
['resumes'] = {'manager', 'boss'}, -- string: 'name', table: {'name', 'name2'}
['taxes'] = {'manager', 'boss'}, -- string: 'name', table: {'name', 'name2'}
},
brand = "LTD Gasoline",
address = "Grove St. Davis Ave, Davis",
price = 250000,
storeArea = { -- PolyZone
vector2(-92.05, -1753.03),
vector2(-53.03, -1737.12),
vector2(-36.36, -1751.89),
vector2(-62.12, -1780.68)
},
minZ = 25.4,
maxZ = 39.23,
productsToOrder = {
-- food
['hotdog'] = true,
-- snacks
['pq_candy'] = true,
-- drinks
['sprunk'] = true,
['ecola'] = true,
['coffee'] = true,
-- alcohol
['logger_beer'] = true,
['patriot_beer'] = true,
['piswasser_beer'] = true,
-- other
['rolling_paper'] = true,
['lighter'] = true,
['fixkit'] = true,
['cigarette'] = true,
-- fuel
['fuel'] = true
},
blipId = 'store', -- Config.Blips (such a blip will be known to anyone who is not an employee or owner)
blipOwnedId = 'owned_store', -- Config.Blips (if you are an employee or owner)
blipPoint = vector3(-53.11, -1756.74, 28.44),
vehiclePoint = vector4(-74.92, -1744.13, 29.36, 112.64),
trailerPoint = vector4(-67.09, -1740.79, 29.29, 114.21),
deliveryPoint = vector3(-72.1, -1745.13, 29.4),
warehousePoint = {
coords = vector3(-40.9, -1751.84, 29.42),
targetCoords = vector3(-40.68, -1751.17, 29.42),
targetHeading = 319.99,
targetSize = vec(2.2, 2.2, 3.75),
},
basketPoint = {
coords = vector3(-54.42, -1754.75, 29.2),
targetCoords = vector3(-54.42, -1754.75, 28.8),
targetHeading = 140.26,
targetSize = vec(0.5, 0.4, 0.65),
},
managementPoint = {
coords = vector3(-44.11, -1749.27, 29.42),
targetCoords = vector3(-44.71, -1749.06, 29.0),
targetHeading = 50.0,
targetSize = vec(1.8, 1.0, 1.5),
},
safePoint = {
coords = vector3(-44.13086, -1747.98, 29.28154),
targetCoords = vector3(-43.92, -1748.01, 28.75),
targetHeading = 50.0,
targetSize = vec(0.75, 0.7, 1.15),
},
moneyEscortSpawnPoint = vector4(-7.8, -1643.68, 28.17, 228.49), -- If you use onesync infinity, don't set the point too far away because it will cause problems.
moneyEscortArrivalPoint = vector3(-79.34, -1745.22, 28.37),
camerasPoints = {
[1] = {
coords = vector3(-49.63, -1759.67, 31.4),
rotation = vec(-4.9349193572998, -2.1423757345928608e-7, 113.91472625732422),
objHeading = 284.12, -- objHeading is reversed
maxLeft = 140,
maxRight = 71.6
},
[2] = {
coords = vector3(-59.87, -1751.08, 31.4),
rotation = vec(-5.7147479057312, -0.0, 96.692344665527),
objHeading = 300.33,
maxLeft = 160.0,
maxRight = 6.9984703063965
},
[3] = {
coords = vector3(-57.38502, -1752.126, 31.2),
rotation = vec(-8.966, 0.054, -90.57),
objHeading = 87.52,
maxLeft = -42.996,
maxRight = -132.38
},
},
points = {
['food'] = {
coords = vector3(-48.93, -1750.36, 29.42),
targetCoords = vector3(-50.22, -1748.27, 29.42), -- For Config.Target
targetHeading = 319.99, -- For Config.Target
targetSize = vec(6.0, 0.9, 2.5), -- For Config.Target
},
['snacks'] = {
coords = vector3(-48.83, -1753.89, 29.42),
targetCoords = vector3(-48.8, -1754.54, 29.42), -- For Config.Target
targetHeading = 183.44, -- For Config.Target
targetSize = vec(2.1, 0.95, 1.65), -- For Config.Target
},
['drinks'] = {
coords = vector3(-54.52, -1748.61, 29.42),
targetCoords = vector3(-54.5, -1747.61, 29.42), -- For Config.Target
targetHeading = 50.0, -- For Config.Target
targetSize = vec(2.9, 0.6, 2.5), -- For Config.Target
},
['alcohol'] = {
coords = vector3(-55.46, -1749.94, 29.42),
targetCoords = vector3(-56.44, -1750.13, 29.42), -- For Config.Target
targetHeading = 50.0, -- For Config.Target
targetSize = vec(2.9, 0.6, 2.5), -- For Config.Target
},
['other'] = {
coords = vector3(-46.26, -1755.53, 29.42),
targetCoords = vector3(-46.01, -1755.97, 29.42), -- For Config.Target