🎉 Character is released. Read more →
Paid Scripts
Company Manager
Configuration
QB Core

QBCore

Editing Notification Or Text UI

  • Go to bridge/qb/client.lua
  • Scroll Down And Find
function  Framework.HelpText(show, message)
	if  show  then
		-- lib.showTextUI(message)
		exports['qb-core']:DrawText(message)
		-- TriggerEvent('cd_drawtextui:ShowUI', 'show', text)
	else
		-- lib.hideTextUI()
		exports['qb-core']:HideText()
		-- TriggerEvent('cd_drawtextui:HideUI')
	end
end
 
function  Framework.Notify(title, message, type, duration)
	-- ===== 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)
	-- lib.notify({ title = title, description = message, type = type, duration = duration })
end

Database Configuration (Autodetect) ⚠️ Important

  • For banking functionality, the script will only use one active table depending on your framework and detected setup:
    • BANK_ACCOUNTS
    • BANK_ACCOUNTS_NEW
    • MANAGEMENT_FUNDS
  • You do not need to create or maintain all three.
    Only the table matching your banking system needs to exist!

If autodetection is disabled (Autodetect = false), make sure you manually point Config.Database.Company and Config.Database.CompanyColumns to the correct table and column structure in your config.

Database Configuration (Manual)

  • QB-BANKING FOR NEW QBCORE RECIPE (opens in a new tab) users should use BANK_ACCOUNTS table

    Config.Database = {
        Autodetect = false,
        Gang = 'gangs',
        Bill = "billings",
        Company = "bank_accounts",
        CompanyColumns = {
            Amount = 'account_balance',
            Type = 'account_type'
        }
    }
     
    if Config.Framework == 'ESX' then
        Config.Database.CompanyColumns.Job = 'name'
    else
        Config.Database.CompanyColumns.Job = 'account_name'
    end
  • QB-MANAGEMENT (OLD QB-CORE) users should use MANAGEMENT_FUNDS table

    Run this query to ensure there is a earning column in your management_funds table:

    ALTER TABLE `management_funds` ADD `earning` INT NOT NULL DEFAULT 0;
    Config.Database = {
        Autodetect = false,
        Gang = 'gangs',
        Bill = "billings",
        Company = "management_funds",
        CompanyColumns = {
            Amount = 'money',ng
            Type = 'type'
        }
    }
     
    if Config.Framework == 'ESX' then
        Config.Database.CompanyColumns.Job = 'name'
    else
        Config.Database.CompanyColumns.Job = 'job_name'
    end
  • RENEWED-BANKING users should use BANK_ACCOUNTS_NEW table

    Run this query to ensure there is a earning column in your bank_accounts_new table:

    ALTER TABLE `bank_accounts_new` ADD `earning` INT NOT NULL DEFAULT 0;
    Config.Database = {
        Autodetect = false,
        Gang = 'gangs',
        Bill = "billings",
        Company = "bank_accounts_new",
        CompanyColumns = {
            Amount = 'amount',
            Type = ''
        }
    }
     
    if Config.Framework == 'ESX' then
        Config.Database.CompanyColumns.Job = 'name'
    else
        Config.Database.CompanyColumns.Job = 'id'
    end

Default Configuration

This is the default QB Core configuration for Company Manager

Config = Config or {}
 
Config.SQLQueries = {}
Config.Framework = 'AUTO' -- AUTO | ESX | QB
Config.FrameworkNames = {
    ESX = 'es_extended',
    QB = 'qb-core',
}
Config.Debug = true
Config.Mugshot = false
Config.Target = false -- Use targer or if false use marker
Config.Lang = 'en'    -- en, sl, ar, id
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.SocietyIntegration = {
    -- OPTIONAL
    -- Supported scripts: esx_addonaccount, qb-management, qb-banking, fd_banking, Renewed-Banking
    -- qb-management only support the old version of qb-management
    ScriptName = false, -- esx_addonaccount, qb-management, qb-banking, fd_banking, Renewed-Banking, false
    ResourceName = '',  -- Resource Name / Script Name in case you renamed it
}
 
Config.PayCheck = {
    Enabled = false,
    Account = 'bank',
    PerHour = true -- false for per minutes
    -- example
    -- job grade salary per hour: $1200
    -- duty total duration 30 minutes
    -- if Config.PayCheck.PerHour is true
    -- salary = (1200 / 60) * 30 = $600
    -- If Config.PayCheck.PerHour is false
    -- salary = 1200 * 30 = $36,000
}
 
Config.Tax = {
    Enable = false,
    Percent = 2,       -- percentage of invoice generated
    Job = 'government' -- who the tax will be sent to?
}
 
Config.Database = {
    Autodetect = true,        -- Enabling this will auto detect the database type
    Gang = 'gangs',
    Bill = "billings",        -- database name for billing
    Company = "bank_accounts",         -- database name for company. For QBCore change to 'management_funds' or 'bank_accounts'
    CompanyColumns = {
        Amount = 'account_balance ',     -- Change to account_balance if using qb-banking
        Type = 'account_type' -- Change to account_type if using qb-banking
    }
}
 
if Config.Framework == 'ESX' then
    Config.Database.CompanyColumns.Job = 'name'
else
    Config.Database.CompanyColumns.Job = 'account_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(451.7270, -973.7192, 29.689),
        -- 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
--     }
-- }
Last updated on