# Number of Members

{% tabs %}
{% tab title="Client" %}

```lua
    QBCore.Functions.TriggerCallback('--:NumberOfMembers', function(numberOfMembers)
        if numberOfMembers > 0 then
            print("Members: " .. numberOfMembers)
        else
            print("Group not found.")
        end
    end, GroupID)
```

{% endtab %}

{% tab title="Server" %}

```lua
-- #NUMBER MEMBERS# --
QBCore.Functions.CreateCallback("--:NumberOfMembers", function(source, cb, groupID)
    local loadFile = LoadResourceFile('nelo-tablet', "groups.json")
    local groups = loadFile and json.decode(loadFile) or { groups = {} }
    for _, group in pairs(groups.groups) do
        if group.groupID == groupID then
            local numberOfMembers = #group.members
            cb(numberOfMembers)
            return
        end
    end
    cb(0) -- group not found
end)
```

{% endtab %}
{% endtabs %}

> You can use this practice to make <mark style="color:orange;">**additional payments**</mark> based on the group or other information.
