# 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 %}
