# Configuration

config.lua is the main config file of the script

{% code title="config.lua" lineNumbers="true" %}

```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"},
}
```

{% endcode %}

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.

{% code title="\[frameworks]\QBCore\client.lua" lineNumbers="true" %}

```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)
```

{% endcode %}

{% code title="\[frameworks]\QBCore\server.lua" lineNumbers="true" %}

```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 ]] ---
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.markhorscripts.com/home/scripts/markhor-bridge/configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
