ESX
This is the default ESX configuration for Company Manager
config/config.lua
function Notify(title, message, type, duration)
ESX.ShowNotification(message)
-- ===== QB uncomment below =====
-- if type == 'info' or type == 'warning' then
-- type = 'primary'
-- end
-- QBCore.Functions.Notify(message, type, duration)
-- ===== QB uncomment above ======
-- exports['bcs_hud']:SendAlert(title, message, type, duration)
-- For mythic notify example
-- if type == 'info' then
-- type = 'inform'
-- end
-- exports['mythic_notify']:SendAlert(type, message)
end
function HelpText(show, message)
if show then
ESX.TextUI(message)
-- exports['qb-core']:DrawText(message)
-- TriggerEvent('cd_drawtextui:ShowUI', 'show', text)
else
ESX.HideUI()
-- exports['qb-core']:HideText()
-- TriggerEvent('cd_drawtextui:HideUI')
end
end
function debugPrint(...)
if Config.Debug then
print(...)
end
end
RegisterNetEvent('company:notify', Notify)
Config = Config or {}
Config.SQLQueries = {}
Config.Framework = 'ESX' -- ESX or QB
Config.Debug = false
Config.Mugshot = false
Config.Target = false -- Use targer or if false use marker
Config.Multijob = false
Config.UI = {
['currency'] = 'USD', -- if you want usd change it to USD, list can be found here https://www.iban.com/currency-codes
['currencysymbol'] = '$',
['disablebossbilling'] = false,
['position'] = 'top', -- Top, Center, or Bottom
['permissions'] = {
['MaxEmployeeCut'] = 20 -- in percentage in the ui
}
}
Config.OffJobPrefix = 'off'
Config.LowestGrade = 0 -- the default grade for hire and fire
Config.BossMenuDepositAccount = "bank" -- can be changed to money / cash or bank
Config.BillCommand = 'billing' -- open bill menu
Config.DeletePaid = false -- This will delete paid bills if set to true
Config.AutoPay = true -- Pay bills pass deadline
Config.AutoPayCheckTimer = "0 * * * *" -- Check Unpaid Bills for every one hour
Config.AutoPayAllowNegative = true -- Allow paying bills with negative balance
Config.DaysUntilExpiry = 30
Config.PayAccountWith = 'bank' -- can be a string or array examples 'bank' or {'bank', 'money'} and checks accounts in order
Config.UseSocietyScript = false -- 'esx_society', 'qb-management', 'qb-banking'
Config.Tax = {
Enable = false,
Percent = 2, -- percentage of invoice generated
Job = 'government' -- who the tax will be sent to?
}
Config.Database = {
Gang = 'gangs',
Bill = "billings", -- database name for billing
Company = "jobs", -- database name for company. For QBCore change to 'management_funds' or 'bank_accounts'
CompanyColumns = {
Amount = 'money', -- Change to account_balance if using qb-banking
Type = 'type' -- Change to account_type if using qb-banking
}
}
if Config.Framework == 'ESX' then
Config.Database.CompanyColumns.Job = 'name'
else
Config.Database.CompanyColumns.Job = 'job_name' -- Change to account_name if using qb-banking
end
Config.EnableBlackMoney = {
mechanic = true, -- enable or disable company to keep black money
ambulance = false,
police = false,
}
Config.Points = {
police = {
vec3(448.2939, -973.0830, 29.6896),
-- vec3(441.2136, -974.8208, 29.6920) -- multiple location example
},
ambulance = {
vec3(263.6728, -1357.9293, 23.5378)
},
lostmc = {
vec3(-474.2486, 272.5231, 83.2463)
}
}
Config.MaxRanks = {
['police'] = 10,
['ambulance'] = 8,
['mechanic'] = 6,
['mafia'] = 10
}
Config.DisableRankDeletion = {
['police'] = { 3, 4 },
['ambulance'] = { 4 },
}
-- Config.Target = { -- optional you can leave it empty if you are not using qtarget
-- police_lspd = {
-- job = 'police',
-- coords = vector3(447.14, -974.46, 30.69),
-- size = vector3(1.5, 1.5, 2.0),
-- heading = 0.0
-- },
-- lostmc = {
-- gang = 'lostmc',
-- coords = vector3(447.14, -974.46, 30.69),
-- size = vector3(1.5, 1.5, 2.0),
-- heading = 0.0
-- }
-- }