# Services App

## Configuration Parameters

### Basic Parameters

* **messageView**: Authority to view messages (According to job grade level)
* **messageSend**: Authority to send messages (According to job grade level)
* **reportView**: Authority to view reports (According to job grade level)
* **reportDeleteAll**: Authority to delete all reports (According to job grade level)
* **openClosingAuth**: Authority to open/close dispatch (According to job grade level)
* **location**: Location of the job center (vector4 format: x, y, z, heading)
* **label**: Display name of the job center
* **isOpen**: Whether this profession can receive messages and reports while the server is starting up (true/false)
* **canCall**: Whether the call option for the job center is enabled (true/false)
* **Duty**: Whether the duty option will appear in the Actions section (true/false)
* **playerNotifications**: Will the opposing player receive a notification when Review is clicked? (true/false)
* **alternativejobs**: Alternative jobs (e.g., `["sheriff"] = true`)
* **jobNumber**: Job number (e.g., 911 for police, 912 for ambulance)
* **showInList**: This task determines whether the service application will be listed in the content.
* **autoCallByDuty**: Automatically opens the player's call option
* **jobBalanceView:** View Job Balance and withdraw money (According to job grade level)

### Billing Parameters

```lua
billing = {
    view = 4, -- Authority to view bills
    create = 4, -- Authority to create bills
    delete = 4, -- Authority to delete bills
    pay = 4, -- Authority to pay bills
}
```

### Employee Parameters

```lua
employe = {
    view = 2,        -- Authority to view employees
    changeRank = 2,  -- Authority to change ranks
    fire = 2,        -- Authority to fire employees
    add = 2,         -- Authority to add employees
}
```

### Job Balance

* **jobBalanceView**: Authority to view the job account balance (According to job grade level)

## Steps to Add a New Job

### Step 1: Basic Structure

To add a new job, use the following basic structure:

{% hint style="info" %}
job\_name = job code&#x20;
{% endhint %}

```lua
["job_name"] = {
    -- Parameters go here
},
```

### Step 2: Example Job Addition

```lua
["taxi"] = {
    messageView = 1,
    messageSend = 1,
    reportView = 1,
    reportDeleteAll = 3,
    openClosingAuth = 3,
    location = vector4(895.15, -179.36, 74.70, 240.00),
    label = "Taxi Station",
    isOpen = true,
    canCall = true,
    Duty = true,
    playerNotifications = false,
    alternativejobs = {},
    jobNumber = "555",
    billing = {
        view = 1,
        create = 2,
        delete = 3,
        pay = 1,
    },
    employe = {
        view = 2,
        changeRank = 3,
        fire = 3,
        add = 3,
    },
    jobBalanceView = 2,
    showInList = true,
    autoCallByDuty = true
},
```

### Step 3: Setting Location

To set the location, get the coordinates of your position in-game:

* X coordinate
* Y coordinate
* Z coordinate (height)
* Heading (direction)

Example: `vector4(895.15, -179.36, 74.70, 240.00)`

### Step 4: Authority Levels

Authority levels typically range from 1-4:

* 1: Lowest rank
* 2: Medium level
* 3: High level
* 4: Highest rank (usually boss/leader)

### **Step 5: Logo**

You should add the logo to the directory of the `gksphone/html/img/jobs` file.\
The logo must include the job name in the file name. (such as logo-taxi.png, logo-mechanic.png)

### Important Notes

1. **Job Name**: Must match the job name registered in the system (e.g., "police", "ambulance")
2. **Comma Usage**: Each parameter line must end with a comma (except the last line)
3. **jobNumber**: Can be left empty ("") or assigned a unique number
4. **alternativejobs**: Can be left empty ({}) or alternative jobs can be added


---

# 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://docs.gkshop.org/gksphone-v2/configuration/services-app.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.
