> For the complete documentation index, see [llms.txt](https://6-services.gitbook.io/six/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://6-services.gitbook.io/six/assets-paid/6-case-esx-qb/configuration/qb.lua.md).

# qb.lua

{% tabs %}
{% tab title="Server (qb.lua)" %}

```lua
if Config.framework == "qb" then
    local QBCore = exports['qb-core']:GetCoreObject()

    function RegisterUsableItem(name, callback)
        QBCore.Functions.CreateUseableItem(name, callback)
    end

    function GetPlayerObject(source)
        local xPlayer = QBCore.Functions.GetPlayer(source)

        return xPlayer
    end

    function addInventoryItem(xPlayer, item, amount)
        xPlayer.Functions.AddItem(item, amount)
    end

    function addWeapon(xPlayer, item, amount)
        xPlayer.Functions.AddItem(item)
    end

    function addAccountMoney(xPlayer, account, cash)
        xPlayer.Functions.AddMoney(cash)
    end
end
```

{% endtab %}
{% endtabs %}
