> For the complete documentation index, see [llms.txt](https://gocomedyfunstoredocs.gitbook.io/gocomedyfun-store/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gocomedyfunstoredocs.gitbook.io/gocomedyfun-store/scripts-free/dj-fun/english/configuration/locations.md).

# Locations

### Location Management&#x20;

#### 1. Add a location to `Config.Lieux`

Each location is defined as a block inside the table `Config.Lieux = { ... }`.

Example of a complete block:

```lua
{
    Coordonnees = vec3(206.29, 1167.90, 228.16),
    Service = vec3(207.52, 1170.44, 227.38),
    Distance = 1,
    Metier = 'dev',
    Nom = 'Dev',
    Rayon = 90,
    Rotation = 90.0
}
```

***

#### 2. Define coordinates

* `Coordonnees`: position of the DJ stage
* `Service`: the point where the player takes service
* Format required: `vec3(x, y, z)`
* You can get these coordinates using `/tpcoords` or **TxAdmin**

***

#### 3. Define interaction distance

* `Distance`: maximum distance (in meters) for the player to interact with the service point (pressing **E**)
* Example: `Distance = 1` ➜ interaction possible within 1 meter

***

#### 4. Define job information

* `Metier`: exact name of the job required to access this location (e.g., `'dj'`, `'police'`, `'mechanic'`)
* `Nom`: name displayed or used internally to identify the location

***

#### 6. Define stage rotation

* `Rotation`: orientation (in degrees) of the **DJ character or stage**
* This determines the **direction your character will face** when the DJ scene is triggered
* Example: `Rotation = 180.0` ➜ the character faces south

***

#### 6. Set the scene rotation

* `Rotation`: Your character's orientation (in degrees)
* Example: `Rotation = 90.0` ➜ Directs the sound south

***

#### 7. Add multiple locations

Each block must be separated by a comma `,`.

Example with two locations:

```lua
Config.Lieux = {
    {
        Coordonnees = vec3(206.29, 1167.90, 228.16),
        Service = vec3(207.52, 1170.44, 227.38),
        Distance = 1,
        Metier = 'dev',
        Nom = 'Dev',
        Rayon = 90,
        Rotation = 90.0
    },
    {
        Coordonnees = vec3(123.45, 678.90, 21.0),
        Service = vec3(124.00, 679.50, 20.0),
        Distance = 1,
        Metier = 'police',
        Nom = 'Police Club',
        Rayon = 100,
        Rotation = 180.0
    }
}
```

***

#### 8. Temporarily disable a location

To disable a location without deleting it, wrap the block with `--[[ ]]`:

```lua
--[[
{
    Coordonnees = vec3(500.0, 300.0, 100.0),
    Service = vec3(501.0, 301.0, 99.5),
    Distance = 1,
    Metier = 'example',
    Nom = 'Disabled Zone',
    Rayon = 75,
    Rotation = 270.0
}
]]
```

***

Now it's fully structured like your actual `Config.Lieux` block, in the correct order and ready to use!
