# Get Groups

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

```lua
    ESX.TriggerServerCallback('--:server:GetGroups', function(groups)
        if groups then
            for _, group in ipairs(groups.groups) do
                print("Group Name: " .. group.name)
                print("Leader: " .. group.leader)
            end
        else
            print("Error")
        end
    end)
```

{% endtab %}

{% tab title="Server" %}

```lua
-- #GET GROUPS# --
ESX.RegisterServerCallback('--:server:GetGroups', function(source, cb)
    exports["nelo-tablet"]:NeloGetGroups(cb)
end)
```

{% endtab %}
{% endtabs %}

> You can use this to later create something based on the group table, like <mark style="color:blue;">**'if isLeader'.**</mark>
