# SLEEK BARBER SHOPS

Barber shop resource for FiveM — business management, NPC employees, minigame, duty system, and modern UI.

### Features

* Auto-detection of ESX / QBCore and appearance manager
* 7 pre-configured locations (Davis, Rockford Hills, Vespucci, Mirror Park, Paleto Bay, Sandy Shores, Hawick)
* Business system with worker/owner ranks and revenue split
* NPC employees with passive income, salary, and happiness system
* Supply system — shops consume supplies per service
* Minigame — optional ox\_lib skillCheck
* Duty system — clock in/out with auto-off-duty on distance
* Favorites — save and load looks
* Modern NUI with configurable colors, blur, particles, and sounds
* ox\_target / qb-target or classic marker + keypress
* 8 services: hair, beard, eyebrows, eyes, makeup, lipstick, blush, chest hair
* 9 banking integrations (ESX, QB, neon-boss, OKOK, FD, TGG, WASABI, CODEM, JUSTBANKING)
* Discord webhooks, multi-language (EN/ES/FR), camera sync, invoice system, hat auto-removal, free hair coupon

### Requirements

| Dependency                                                           |   Required  |
| -------------------------------------------------------------------- | :---------: |
| [ox\_lib](https://github.com/overextended/ox_lib)                    |     Yes     |
| [oxmysql](https://github.com/overextended/oxmysql) or mysql-async    |     Yes     |
| ESX or QBCore                                                        |     Yes     |
| A clothing resource (illenium-appearance, qb-clothing, or esx\_skin) | Recommended |
| ox\_target or qb-target                                              |   Optional  |

### Installation

#### Step 1 — Place the resource

Copy `forge-barber` into your server's `resources/` directory.

#### Step 2 — Database

Auto-creates tables on first start (`Config.AutoMigrateDB = true`). Tables: `forge_business` (shared with forge-tattoo) and `barber_favorites`.

For manual setup, import `INSTALL_SQL.sql`.

#### Step 3 — server.cfg

```cfg
ensure ox_lib
ensure forge-barber
```

`ox_lib` must start **before** `forge-barber`.

#### Step 4 — Create jobs (if using business mode)

**ESX:**

```sql
INSERT INTO `jobs` (`name`, `label`) VALUES
('barber1', 'Barber Shop - Davis'),
('barber2', 'Barber Shop - Rockford Hills'),
('barber3', 'Barber Shop - Vespucci'),
('barber4', 'Barber Shop - Mirror Park'),
('barber5', 'Barber Shop - Paleto Bay'),
('barber6', 'Barber Shop - Sandy Shores'),
('barber7', 'Barber Shop - Hawick');
```

**QBCore** — add equivalent entries in `qb-core/shared/jobs.lua`.

#### Step 5 — Start your server

The resource auto-detects your framework and appearance manager. Edit `config/config.lua` and `config/shops.lua` to customize.

### Configuration

| File                       | Purpose                                                                |
| -------------------------- | ---------------------------------------------------------------------- |
| `config/config.lua`        | Master config — economy, NPCs, supplies, minigame, UI, markers, camera |
| `config/shops.lua`         | Shop locations, coordinates, business settings                         |
| `config/translation.lua`   | UI and notification text (EN/ES/FR)                                    |
| `config/bridge_client.lua` | Client framework bridge (usually no edits needed)                      |
| `config/bridge_server.lua` | Server framework bridge (usually no edits needed)                      |

#### Auto-detection

| What               | How                                                               |
| ------------------ | ----------------------------------------------------------------- |
| Framework          | `es_extended` running → ESX, `qb-core` running → QB               |
| Appearance Manager | First started wins: illenium-appearance → qb-clothing → esx\_skin |

To override, set `Config.AppearanceManager = 'esx_skin'` directly in `config.lua`.

### Shop Locations

Defined in `config/shops.lua`. Ships with 7 locations:

| Key               | Location       | Default Job | Business |
| ----------------- | -------------- | ----------- | :------: |
| `barber_davis`    | Davis          | `barber1`   |    Yes   |
| `barber_rockford` | Rockford Hills | `barber2`   |    No    |
| `barber_vespucci` | Vespucci       | `barber3`   |    No    |
| `barber_mirror`   | Mirror Park    | `barber4`   |    No    |
| `barber_paleto`   | Paleto Bay     | `barber5`   |    No    |
| `barber_sandy`    | Sandy Shores   | `barber6`   |    No    |
| `barber_hawick`   | Hawick         | `barber7`   |    No    |

#### Adding a new shop

Copy an existing entry in `shops.lua`, change coordinates and job name. Set `isBusiness = false` for a public self-service shop.

### Business & Economy

#### Revenue split

```lua
Config.CompanySharePercent = 80   -- Goes to the shop balance
Config.WorkerSharePercent  = 20   -- Goes to the worker's pocket
```

#### Payment routing

**Built-in balance** (default):

```lua
Config.UseBuiltinBalance = true
```

**External banking:**

```lua
Config.UseBuiltinBalance = false
Config.SocietyMethod = 'ESX'   -- ESX, QB, FORGE, OKOK, FD, TGG, WASABI, CODEM, JUSTBANKING
```

#### Neon-Boss

```lua
Config.UseNeonBossMenu = true
```

Routes all money through neon-boss. Each shop's `assignedJob` must be registered in neon-boss.

### NPC Employees

* Hire from `Config.NPCPool` (8 candidates with skill levels 1–4)
* Pool rotates every `NPCRotationMinutes` (120 min)
* Max `MaxNPCEmployees` (3) per shop
* Salary = level × `NPCSalaryPerLevel` every `NPCSalaryIntervalMin` minutes

#### Passive income

When `EnableExtraSales = true`:

```
Income = ExtraSaleBase × (Level ^ ExtraSaleLevelExp) × HappinessMod × TeamBonus
```

#### Happiness

|    Level    | Modifier | Cause                            |
| :---------: | :------: | -------------------------------- |
|   3 Happy   |   ×1.00  | Supplies OK                      |
|    2 Okay   |   ×0.75  | Normal                           |
|  1 Unhappy  |   ×0.35  | Supplies below 50                |
| 0 Miserable |   ×0.00  | Supplies below 10 — NPC may quit |

### Supply System

Shops consume `SupplyPerService` (2) units per service. Owners restock via the management panel at `SupplyUnitPrice` ($50) per unit. Max capacity: `DefaultSupplyMax` (100). Running out blocks all services.

### Other Systems

| System           | Key Settings                                                       |
| ---------------- | ------------------------------------------------------------------ |
| **Minigame**     | `UseMiniGame`, `MinigameDifficulty` — ox\_lib skillCheck           |
| **Duty**         | `DutyMaxDistance`, `DutyCheckInterval` — auto-off-duty on distance |
| **Interaction**  | `TargetMode`, `TargetScript` — ox\_target/qb-target or markers     |
| **UI**           | Full color palette in `Config.UIColors`, blur, particles, volume   |
| **Camera**       | Zone presets in `Config.CamAngles`, FOV range                      |
| **Webhooks**     | Discord sale notifications — URL in `bridge_server.lua`            |
| **Translations** | `Config.Locale` — `'en'`, `'es'`, `'fr'`                           |

### Skin Manager Compatibility

Most skin managers include a built-in barber shop. When forge-barber is running, the skin manager should disable its own barber blips/zones to avoid duplicates.

#### Does my skin manager need modification?

| Skin Manager              |    Needs Modification?    |
| ------------------------- | :-----------------------: |
| esx\_skin / skinchanger   | No — works out of the box |
| illenium-appearance (ESX) |          **Yes**          |
| illenium-appearance (QB)  |          **Yes**          |
| fivem-appearance (ESX)    |          **Yes**          |
| qb-clothing (QB)          |          **Yes**          |
| rcore\_clothing           |  No — compatible natively |

#### Pre-modified downloads

Don't want to modify it yourself? Use the version that already includes full forge compatibility:

{% file src="/files/6NeQiAbFy8TJIjwIUojy" %}

{% file src="/files/4QM81EgqpAhDbhQShLXZ" %}

{% file src="/files/pPV4V51kn3RHyQVGwKpU" %}

{% file src="/files/hmFwSe11EUnVv4JvEPQw" %}

> These versions auto-detect all three forge scripts (tattoo, barber, clothes). When a forge script is running, the skin manager disables its own overlapping shop and calls the appropriate export after every appearance load.

#### QB-Clothing users

If `qb-clothing` is your appearance manager, it needs this event handler in `client/main.lua` to persist barber changes across reconnects:

```lua
RegisterNetEvent('qb-clothing:setSkinData', function(type, index, texture)
    if not skinData then return end
    if skinData[type] then
        skinData[type].item    = index
        skinData[type].texture = texture
    end
    ApplySkinData()
end)
```

> The pre-modified qb-clothing download already includes this.

### Support

[Join our Discord](https://discord.gg/UTVssdrXRV) — installation help, bug reports, feature requests.

### License

© CodeForge — All rights reserved.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://codeforge.gitbook.io/codeforge/sleek-series/sleek-barber-shops.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
