> For the complete documentation index, see [llms.txt](https://docs.brutalscripts.com/site/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.brutalscripts.com/site/scripts/gangs/create-a-new-gang.md).

# Create a new gang

{% hint style="info" %}
You create as many gangs as gang places are in the config, but you can add more to the config as you wish.
{% endhint %}

***

## Add gang places to the config (optional)

{% hint style="info" %}
This step is not needed anymore as you can create HQs in-game!
{% endhint %}

You can add a table like the example to this table: 'HQS'

<figure><img src="/files/NZPATyWvyk2dIbaj6VkV" alt=""><figcaption><p>Add gangs inside of this table.</p></figcaption></figure>

<details>

<summary>Example gang place</summary>

```lua
["ballas"] = {
            MapPosition = {
                vector2(-24.3027, -1816.1602),
                vector2(59.9349, -1887.5460),
                vector2(82.5924, -1857.7417),
                vector2(0.8374, -1788.4600),
            },

            MiddlePoint = vector3(7.7007, -1816.5464, 25.3697),
            HQCanBeCaptured = true,

            DefaultCoords = {
                Cloakrooms = {
                    vector3(0.7138, -1819.6553, 29.1527),
                },
    
                Stashes = {
                    vector3(2.5605, -1817.7943, 29.1526),
                },

                BalanceManages = {
                    vector3(-0.4499, -1809.0541, 29.1527),
                },

                Garages = {
                    {
                        open = vector3(11.8271, -1817.3561, 25.2843),
                        spawn = vector4(13.5363, -1820.2806, 24.7847, 143.9035)
                    },
                },
            },
        },
```

</details>

## Create a HQ

You can create HQs in-game in the 'editgangs' menu. Fill out the needed fields and hit create.&#x20;

<figure><img src="/files/8pyeJyYT74oeDPiZy3w0" alt=""><figcaption></figcaption></figure>

## Create a gang

* **You can create gangs&#x20;**<mark style="color:yellow;">**in-game**</mark>**&#x20;with the command basically configured to 'editgangs'**

<figure><img src="/files/ZGvQLJWVtA7i8aE1pxSC" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
Only that player can open the menu or use the command who have the permission for it! You can set this at the config. Only one person can open the editgangs at a time.&#x20;
{% endhint %}

<figure><img src="/files/ve5PCUAUQ30QhrlocMjD" alt=""><figcaption><p>Set which admingroups should have the right to open the menu.</p></figcaption></figure>

## Set your job as the new gang which you have created

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

```
/setjob [playerid] [gang_name] 0

-- for example: /setjob 13 ballas 0
-- THE JOB GRADE ALWAYS 0.
```

{% endtab %}

{% tab title="QBCORE" %}

```
/setgang [playerid] [gang_name] 0

-- for example: /setgang 13 ballas 0
-- THE GANG GRADE ALWAYS 0.
```

{% endtab %}
{% endtabs %}

## Make someone a gang leader

**After the gang is created add the leader to the gang, with the command basically configured to 'setgangleader'. Before use that command make sure the player is already a member of the gang.**

```
/setgangleader [player_id]
```
