> 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-paid/service-fun/english/configuration/lieux.md).

# Lieux

#### Defining Service Points

The `Config.Lieux` parameter allows you to define all the locations where players can access the **Service Fun** menu to clock in or out of duty.

Each point is linked to a job (`Metier`) and its off-duty version (`MetierOff`).\
✔️ **Unlimited multi-location support** – Add as many points as you want.\
💡 On first service activation, the script **automatically creates the `_off` job** in the SQL database (copying job and grades, with salary set to 0).

***

#### Example Configuration

```lua
Config.Lieux = {
    {
        Nom = "LSPD",
        Metier = "police",
        MetierOff = "police_off",
        Distance = 2.0,
        Service = vector4(441.0, -981.0, 30.0, 180.0)
    },
}
```

***

#### Steps to Configure a Location

**1. Locate the parameter**\
Open your `config.lua` and find:

```lua
Config.Lieux = { ... }
```

**2. Add a service point**\
Each location requires:

* `Nom`: internal name of the point
* `Metier`: name of the on-duty job
* `MetierOff`: name of the off-duty job
* `Distance`: activation radius (in meters)
* `Service`: position as `vector4(x, y, z, h)`

**3. Example for a hospital**

```lua
{
    Nom = "EMS",
    Metier = "ambulance",
    MetierOff = "ambulance_off",
    Distance = 2.0,
    Service = vector4(301.0, -600.0, 43.3, 90.0)
}
```

**4. Add multiple locations**

```lua
Config.Lieux = {
    {
        Nom = "LSPD",
        Metier = "police",
        MetierOff = "police_off",
        Distance = 2.0,
        Service = vector4(441.0, -981.0, 30.0, 180.0)
    },
    {
        Nom = "EMS",
        Metier = "ambulance",
        MetierOff = "ambulance_off",
        Distance = 2.0,
        Service = vector4(301.0, -600.0, 43.3, 90.0)
    }
}
```

**5. Save and restart**

* Save your `config.lua`
* Restart the resource:

```bash
restart service_fun
```

**6. Test in-game**

* Walk near a configured point
* Press **E** to open the **Service Fun** menu
