---
name: "Arma 3: Dynamic Groups"
type: topic
aliases: ["Arma 3 Dynamic Groups", "Dynamic Groups"]
source: https://community.bistudio.com/wiki/Arma_3:_Dynamic_Groups
revid: 341445
updated: 2023-05-27T19:54:35Z
---

# Arma 3: Dynamic Groups

Arma 3 v1.42

### Installation

To add the Dynamic Groups functionality to your mission do the following steps:

Create a file in the mission root directory named [initServer.sqf](../topics/Event_Scripts.md#initserver-sqf) (if you don't have it there already).
This file is executed only on the server, when the mission starts.

Into this file, copy & paste one of these two lines to make the server initialise the Dynamic Groups framework:

```sqf
["Initialize"] call BIS_fnc_dynamicGroups;            // initialises the Dynamic Groups framework
// or
["Initialize", [true]] call BIS_fnc_dynamicGroups;    // initialises the Dynamic Groups framework and groups led by a player at mission start will be registered
```

Create another file in the mission root directory named [initPlayerLocal.sqf](../topics/Event_Scripts.md#initplayerlocal-sqf) (if you don't have it there already).
This file is executed only by machines which have a human player when the mission starts (every machine but a dedicated server or a [headless client](../topics/Headless_Client.md) - see [hasInterface](../commands/hasInterface.md)).

Into this file, copy & paste one of these two lines to make a client/player initialise the Dynamic Groups framework:

```sqf
["InitializePlayer", [player]] call BIS_fnc_dynamicGroups;            // initialises the player/client side Dynamic Groups framework
// or
["InitializePlayer", [player, true]] call BIS_fnc_dynamicGroups;    // initialises the player/client side Dynamic Groups framework and registers the player group
```

### Dynamic Groups Interface Access

The Dynamic Groups interface is tied to the **TeamSwitch** action, and its default keybind is <kbd>U</kbd>.

### Additional Functionality

If you would like to register a group manually (same as a player clicking the **CREATE** button in the UI) use **RegisterGroup**.
Please note that the leader you pass must be the actual leader of the given group, for example:

```sqf
if (isServer) then
{
    private _group = group player;
    private _leader = leader _group;
    private _data = [nil, "Awesome Group", false]; // [<Insignia>, <Group Name>, <Private>]

    ["RegisterGroup", [_group, _leader, _data]] call BIS_fnc_dynamicGroups;
};
```

> [!NOTE]
> See [BIS_fnc_dynamicGroups](../functions/BIS_fnc_dynamicGroups.md) in the Functions Viewer for more sub-functions and their parameters.

<sub>Source: [BI Community Wiki — Arma 3: Dynamic Groups](https://community.bistudio.com/wiki/Arma_3:_Dynamic_Groups) (revision 341445).</sub>
