> For the complete documentation index, see [llms.txt](https://docs.infinitypulse.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.infinitypulse.dev/city-hall/configuration.md).

# Configuration

```lua
Get The Pos For The Tablet With The Command 'cityhall'
```

### 🧠 Overview

The configuration table (`CFG`) is used to manage job listings, positions, and general framework compatibility for the job application system.

***

### ⚙️ Base Configuration

```lua
{
    CORE = "QBX", -- Options: "ESX", "QBX", "QB", "CUSTOM"
    jobs = { ... },
    pos = { ... }
}
```

#### `CORE`

* Defines which framework is used for job handling.
* Supports: `ESX`, `QBX`, `QB`, and `CUSTOM`.

***

### 📌 Job Entry Structure

Each job entry inside `CFG.jobs` follows a defined schema:

```lua
{
    job = "unemployed",
    grade = 1,
    pos = vector2(-270.0, -952.0),
    title = "City Planner",
    department = "Urban Development",
    type = "Full-Time",
    salary = "65,000 - 85,000",
    location = "City Hall - Main Building",
    postedDays = 2,
    description = "Job description here...",
    requirements = {
        "Requirement 1",
        "Requirement 2",
    },
    benefits = {
        "Benefit 1",
        "Benefit 2",
    },
    gps = true,     -- Enables map GPS pin
    apply = true,   -- Enables application button

    -- Optional: Overwrite application logic
    -- apply_action = function(src, job, grade)
    --     -- Custom server-side logic
    -- end,
}
```

#### 🔧 Field Descriptions

| Field          | Type       | Description                                                                  |
| -------------- | ---------- | ---------------------------------------------------------------------------- |
| `job`          | `string`   | Internal job name used by the framework                                      |
| `grade`        | `number`   | Grade level within the job                                                   |
| `pos`          | `vector2`  | 2D Position where the job is listed or applied                               |
| `title`        | `string`   | Display title for the job                                                    |
| `department`   | `string`   | Department the job belongs to                                                |
| `type`         | `string`   | Job type (e.g., Full-Time, Part-Time)                                        |
| `salary`       | `string`   | Salary range or details                                                      |
| `location`     | `string`   | Physical or in-world location                                                |
| `postedDays`   | `number`   | How many days ago the job was posted                                         |
| `description`  | `string`   | Description of job duties and responsibilities                               |
| `requirements` | `table`    | List of requirements                                                         |
| `benefits`     | `table`    | List of benefits                                                             |
| `gps`          | `boolean`  | Whether GPS routing is available                                             |
| `apply`        | `boolean`  | Whether users can apply for this job                                         |
| `apply_action` | `function` | (Optional) Override method for custom job application behavior (server-side) |

***

### 🗺️ Interaction Positions

These are the world positions where players can interact with the job system.

```lua
pos = {
    vector4(-271.8789, -954.8341, 31.6770, 31.5),
    vector4(-269.9323, -953.8364, 31.6485, 30.5),
    vector4(-268.4203, -953.1323, 31.6770, 31.5),
}
```

Each `vector4` contains:

* **x, y, z** coordinates
* **heading** (rotation angle)

These positions can be used for rendering interaction zones (e.g., text prompts, 3D markers).

***

### ➕ Adding More Jobs

To add another job, simply append a new table to the `CFG.jobs` array:

```lua
{
    job = "mechanic",
    grade = 0,
    pos = vector2(-100.0, -200.0),
    title = "Auto Mechanic",
    department = "Public Works",
    type = "Part-Time",
    salary = "45,000 - 60,000",
    location = "Los Santos Auto Shop",
    postedDays = 1,
    description = "Repair and maintain city vehicles.",
    requirements = { "Basic mechanical knowledge" },
    benefits = { "Tool allowance" },
    gps = true,
    apply = true,
}
```

***

### 🧩 Extending Logic (Server-Side)

If a job needs **custom apply logic**, you can override the default by using `apply_action`.

by using the apply\_action how can hadle yourself the action of the player for example aplication system

Example:

```lua
apply_action = function(src, job, grade)
    -- Trigger custom server event or logic
    print(("Player %s applied to %s at grade %d"):format(src, job, grade))
end,
```
