> For the complete documentation index, see [llms.txt](https://documentation.madonnestudio.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.madonnestudio.com/paid-scripts/madonnedoj/configuration/services-configuration.md).

# Services Configuration

The Services section allows you to configure all police and justice services available on your server. Each service can have its own permissions and access levels.

## Service Structure

Each service in the configuration follows this structure:

```lua
{
  name = "LSPD",
  fullName = "Los Santos Police Department",
  isJustice = false
}
```

### Properties

| Property    | Type      | Required | Description                                |
| ----------- | --------- | -------- | ------------------------------------------ |
| `name`      | `string`  | ✅ Yes    | **Unique** short name/code for the service |
| `fullName`  | `string`  | ✅ Yes    | Full display name of the service           |
| `isJustice` | `boolean` | ✅ Yes    | Whether this is a judicial service         |

{% hint style="danger" %}
**Important:** The `name` property must be **unique** across all services. It's used as the service identifier throughout the system.
{% endhint %}

## Police Services

Police services are standard law enforcement agencies. They have configurable permissions based on roles.

### Example: Police Department

```lua
{
  name = "LSPD", -- MUST BE UNIQUE
  fullName = "Los Santos Police Department",
  isJustice = false
}
```

### Common Police Services

<details>

<summary><strong>Los Santos Police Department (LSPD)</strong></summary>

```lua
{
  name = "LSPD",
  fullName = "Los Santos Police Department",
  isJustice = false
}
```

</details>

<details>

<summary><strong>Los Santos Sheriff's Department (LSSD)</strong></summary>

```lua
{
  name = "LSSD",
  fullName = "Los Santos Sheriff's Department",
  isJustice = false
}
```

</details>

<details>

<summary><strong>San Andreas Highway Patrol (SAHP)</strong></summary>

```lua
{
  name = "SAHP",
  fullName = "San Andreas Highway Patrol",
  isJustice = false
}
```

</details>

<details>

<summary><strong>Federal Investigation Bureau (FIB)</strong></summary>

```lua
{
  name = "FIB",
  fullName = "Federal Investigation Bureau",
  isJustice = false
}
```

</details>

## Justice Services

Justice services (`isJustice = true`) have special properties and automatically receive **all permissions**.

### Example: Department of Justice

```lua
{
  name = "DOJ",
  fullName = "Department of Justice",
  isJustice = true
}
```

### What Justice Services Can Do

Services with `isJustice = true` have unlimited access:

* ✅ **Access all folders** - View any investigation regardless of service
* ✅ **View all documents** - Read all case files across services
* ✅ **Issue warrants** - Create and sign arrest/search warrants
* ✅ **Sign warrants** - Approve warrants created by police
* ✅ **Manage all records** - Edit criminal records

## Complete Configuration Example

Here's a complete example with multiple services:

```lua
Services = {
  -- Police Services
  {
    name = "LSPD",
    fullName = "Los Santos Police Department",
    isJustice = false
  },
  {
    name = "LSSD",
    fullName = "Los Santos Sheriff's Department",
    isJustice = false
  },
  {
    name = "SAHP",
    fullName = "San Andreas Highway Patrol",
    isJustice = false
  },
  {
    name = "FIB",
    fullName = "Federal Investigation Bureau",
    isJustice = false
  },
  
  -- Justice Services
  {
    name = "DOJ",
    fullName = "Department of Justice",
    isJustice = true
  },
}
```

## Best Practices

✅ **Do:**

* Use clear, recognizable service codes (`LSPD`, `SAHP`, etc.)
* Have at least one justice service for warrant management
* Keep service names consistent with your server's departments

❌ **Don't:**

* Use duplicate service names
* Give `isJustice = true` to police services
* Use special characters in the `name` field
* Change service names after data has been created

## Adding a New Service

To add a new service to your server:

1. Copy an existing service block
2. Change the `name` to a unique identifier
3. Update the `fullName` to the full service name
4. Set appropriate permission values
5. Set `isJustice` to `true` or `false`
6. Add it to the `Services` table

**Example - Adding a Park Ranger service:**

```lua
{
  name = "PARK",
  fullName = "San Andreas Park Rangers",
  isJustice = false
}
```

***

Need help? Visit our [Support page](/paid-scripts/madonnedoj/support.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://documentation.madonnestudio.com/paid-scripts/madonnedoj/configuration/services-configuration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
