⚙️Configuration
Here's a preview of all the config files of the script
config.lua is the main config file of the script
config.lua
Config = {}
-- Manually select the notification resource below --
Config.notificationList = {
{name = "ESX", alias = "ESXNOT", selected = false},
{name = "QBCore", alias = "QBNOT", selected = false},
{name = "OX_Lib", alias = "OXNOT", selected = false},
{name = "GTA", alias = "DEFNOT", selected = true},
}
-- Manually select the menu resource below --
Config.menuList = {
{name = "OX_Lib", alias = "OXMENU", selected = true},
}
Config.framework = "AUTO" -- Default is AUTO. Only change this if the automatic detection does not work!
Config.inventory = "AUTO" -- Default is AUTO. Only change this if the automatic detection does not work!
Config.interact = "AUTO" -- Default is AUTO. Only change this if the automatic detection does not work!
Config.dispatch = "AUTO" -- Default is AUTO. Only change this if the automatic detection does not work!
-- Only change the values below if you know what you are doing! --
-- Only change the values below if you know what you are doing! --
-- Only change the values below if you know what you are doing! --
Config.functions = {}
Config.exportList = {}
Config.FWPH = nil
Config.frameworkList = {
{resource = "es_extended", alias = "ESX"},
{resource = "qb-core", alias = "QBCORE"},
{resource = "ND_Core", alias = "NDCORE"},
}
Config.inventoryList = {
{resource = "es_extended", alias = "ESXINV"},
{resource = "qb-inventory", alias = "QBINV"},
{resource = "qs-inventory", alias = "QSINV"},
{resource = "ox_inventory", alias = "OXINV"},
}
Config.interactList = {
{resource = "ox_target", alias = "OXT"},
{resource = "qb-target", alias = "QBT"},
{resource = "interact", alias = "IRT"},
}
Config.dispatchList = {
{resource = "cd_dispatch", alias = "CDDIS"},
{resource = "qs-dispatch", alias = "QSDIS"},
{resource = "ps-dispatch", alias = "PSDIS"},
{resource = "linden_outlawalert", alias = "LDDIS"},
{resource = "core_dispatch", alias = "CRDIS"},
}
Each supported resource has separate lua files. These can all be fully customized and are not encrypted. An example of this is the client and server file of QBCore.
[frameworks]\QBCore\client.lua
Config.exportList["QBCORE"] = {}
Config.exportList["QBCORE"].startupFramework = function()
Config.FWPH = exports['qb-core']:GetCoreObject()
end
Config.exportList["QBCORE"].getCurrentJob = function()
return Config.FWPH.Functions.GetPlayerData().job.name
end
Config.exportList["QBCORE"].getIdentifier = function()
return Config.FWPH.Functions.GetPlayerData().license
end
RegisterNetEvent('QBCore:Client:OnPlayerLoaded')
AddEventHandler('QBCore:Client:OnPlayerLoaded', function()
TriggerEvent("markhor_bridge:playerLoaded")
end)
[frameworks]\QBCore\server.lua
Config.exportList["QBCORE"] = {}
Config.exportList["QBCORE"].startupFramework = function()
Config.FWPH = exports['qb-core']:GetCoreObject()
end
--- [[ INVENTORY FUNCTIONS ]] ---
Config.exportList["QBCORE"].addMoney = function(src, item, amount)
local xPlayer = Config.FWPH.Functions.GetPlayer(src)
xPlayer.Functions.AddMoney(item, amount)
end
Config.exportList["QBCORE"].RegisterUsableItem = function(item, func)
Config.FWPH.Functions.CreateUseableItem(item, func)
end
--- [[ END OF INVENTORY FUNCTIONS ]] ---
--- [[ OTHER FUNCTIONS ]] ---
Config.exportList["QBCORE"].getCopCount = function(jobList)
local xPlayers = nil
local counter = 0
xPlayers = Config.FWPH.Functions.GetPlayers()
for i=1, #xPlayers, 1 do
local xPlayer = Config.FWPH.Functions.GetPlayer(xPlayers[i])
local job = nil
job = xPlayer.PlayerData.job.name
if string.find(jobList, job) then
counter = counter + 1
end
end
return counter
end
Config.exportList["QBCORE"].getPlayerJob = function(src)
return Config.FWPH.Functions.GetPlayer(src).PlayerData.job.name
end
Config.exportList["QBCORE"].setPlayerJob = function(src, job, grade)
Config.FWPH.Functions.GetPlayer(src).Functions.setJob(job, grade)
end
--- [[ END OF OTHER FUNCTIONS ]] ---
Last updated