Skip to main content

QB Core

This is the default QB Core configuration for license manager

function Notify(title, message, type, duration)
-- ESX.ShowNotification(message)
-- ===== QB uncomment below =====
if type == 'info' then
type = 'primary'
end
QBCore.Functions.Notify(message, type, duration)
-- ===== QB uncomment above ======

-- exports['ataUI']:Alert({
-- Theme='dark',
-- Type=type,
-- title=title,
-- msg=message,
-- time=duration
-- })
-- exports['bcs_hud']:SendAlert(title, message, type, duration)
-- exports['okokNotify']:Alert(title, message, duration, type)
end

function HelpText(show, message)
if show then
-- ESX.TextUI(message)
-- exports['ataUI']:openText('e', message, 'light', 'blue', 'blue')
-- TriggerEvent('cd_drawtextui:ShowUI', 'show', message)
-- exports['okokTextUI']:Open(message, 'lightblue', 'right')
exports['qb-core']:DrawText(message)
-- exports['bcs_hud']:displayHelp(message)
else
-- ESX.HideUI()
-- exports['ataUI']:closeText()
-- TriggerEvent('cd_drawtextui:HideUI')
-- exports['okokTextUI']:Close()
exports['qb-core']:HideText()
-- exports['bcs_hud']:closeHelp()
end
end

RegisterNetEvent('LicenseManager:notify', Notify)

Config = {
framework = "QB", -- ESX or QB
debug = false,
target = false,
enablePed = false,
ManagerBased = true,
Database = {
badge = 'badges',
license = 'licenses',
license_history = 'license_history',
},
-- set either one of this up in your server.cfg
-- fivemanage
-- setr FIVEMANAGE_TOKEN fivemanagetoken
-- standalone
-- setr IMAGE_SERVER your.image.server.ip
-- discord
-- setr SCREENSHOT_WEBHOOK your_webhook_link
Screenshot = 'fivemanage',
DistanceCheck = 8, -- Maximum distance to create a player license
society = false, -- If you want the payment for licenses to be sent to company account, set it to true
-- Available options
-- 'ox_inventory',
-- 'qs-inventory',
-- 'core_inventory',
-- true (using default framework inventory)
-- false (if you dont want to use the license as items)
inventory = false,
Expiry = {
RemoveOnExpired = false,
CheckInterval = 3 * 60 * 60 * 1000 -- Checks every three hour of server lifetime
},
ConvertMode = {
enable = false,
-- put the old licenses ['your old license type name'] = 'the new name in Config.Licenses'
old_licenses = {
['drive'] = 'driver_car',
['drive_bike'] = 'driver_bike',
['drive_truck'] = 'driver_truck'
}
},
maleGender = 'm', -- match your database gender column
}

-- convert from esx_license old licenses, Compatible for oxmysql
Config.UI = {
['currency'] = 'USD', -- if you want usd change it to USD, list can be found here https://www.iban.com/currency-codes
['expiry'] = true, -- enable or disable expiry system
}