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

# Configuration

Every option of Cuxial License explained: permissions, jobs, office, photo studio, ID check and fake IDs.

The behaviour of the script lives in `shared/config.lua`. The cards themselves are not in any file: they are designed in game with `/license`. Restart the resource after changing the config.

## General

| Option        | Type    | Default  | What it does                                                                                                                     |
| ------------- | ------- | -------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `debug`       | boolean | `false`  | `true` prints a line in the server and client console when the script is ready.                                                  |
| `paymentType` | string  | `'cash'` | Account charged at the licence office. `'cash'` or `'bank'`.                                                                     |
| `showRadius`  | number  | `5.0`    | Radius in metres. Players inside it see the card you show, and are the ones listed as nearby in the issuing and ID check panels. |

## Staff · `admin`

| Option       | Type   | Default   | What it does                                                                                                                      |
| ------------ | ------ | --------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `permission` | string | `'admin'` | Framework permission needed to run `/license` and to create, edit and delete card designs. It is checked through `cuxial_bridge`. |

## Jobs · `authorizedJobs` and `revokeJobs`

Both are tables of `['job name'] = minimum grade`. The entries that come in the file are examples: replace them with the jobs of your server.

| Option           | Type  | What it does                                                                                                                                                 |
| ---------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `authorizedJobs` | table | Jobs that can use `/jobissue` and `/checklicense`, issue cards and read the result of an ID check. The player needs that job with the grade shown or higher. |
| `revokeJobs`     | table | Extra jobs allowed to revoke and restore licences. Staff and the jobs in `authorizedJobs` can already do it.                                                 |

{% code title="shared/config.lua" %}

```lua
authorizedJobs = {
    ['police'] = 2,
    ['ambulance'] = 3,
},

revokeJobs = {
    ['police'] = 4,
},
```

{% endcode %}

## Licence office · `zones`

A list of offices. Each one spawns an NPC with a target option that opens the store. The store sells every card that has **Charge money** enabled and is not restricted to a job.

| Option    | Type    | What it does                               |
| --------- | ------- | ------------------------------------------ |
| `name`    | string  | Internal name of the office.               |
| `coords`  | vector3 | Position of the NPC.                       |
| `heading` | number  | Direction the NPC faces. `0.0` if omitted. |
| `model`   | string  | Ped model of the NPC.                      |
| `label`   | string  | Text of the target option.                 |

The office in the file is an example. Add as many as you need, or leave the list empty to have none and open the store from your own resource with [`openGetCard`](/scripts/core/cuxial-license/developers.md#opengetcard).

{% code title="shared/config.lua" %}

```lua
zones = {
    {
        name = 'city_hall',
        coords = vector3(-545.0, -204.0, 38.2),
        heading = 210.0,
        model = 's_m_m_highsec_01',
        label = 'Licence office',
    },
},
```

{% endcode %}

## Photo studio · `photo`

During the photo the player is moved to the studio, alone in their own instance, and returned to where they were when it ends.

| Option           | Type    | Default                   | What it does                                                                                                                                       |
| ---------------- | ------- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `enabled`        | boolean | `true`                    | `false` turns the studio off: the player is not moved and no camera is created.                                                                    |
| `camOffset`      | vector3 | `vector3(0.0, 0.7, 0.65)` | Starting frame. `z` is the height, above the player's position, of the point the camera looks at. `y` plus 0.5 is the starting distance in metres. |
| `fov`            | number  | `36.0`                    | Field of view of the camera. Lower values zoom in.                                                                                                 |
| `greenScreenPos` | vector4 | Included studio           | Where the player stands for the photo: `x`, `y`, `z` and heading. The default is inside the green-screen room that ships with the script.          |
| `maxUploadSize`  | number  | `4000000`                 | Maximum size of the photo the server accepts for upload, in characters. A larger image is rejected.                                                |
| `uploadCooldown` | number  | `3`                       | Seconds a player must wait between two photo uploads.                                                                                              |

{% hint style="warning" %}
Only change `greenScreenPos` if you move the photo to a green-screen room of your own. The background is removed by colour, so a place without a green backdrop gives a photo with its scenery.
{% endhint %}

## Interface · `theme`

| Option  | Type         | Default      | What it does                  |
| ------- | ------------ | ------------ | ----------------------------- |
| `color` | string (hex) | configurable | Accent colour of every panel. |

## ID check · `idCheck`

| Option            | Type   | Default                          | What it does                                                                                |
| ----------------- | ------ | -------------------------------- | ------------------------------------------------------------------------------------------- |
| `logo`            | string | `'image/default.png'`            | Image shown in the ID check panel. Path relative to the `web/build` folder of the resource. |
| `title`           | string | `'Los Santos Police Department'` | Title of the panel.                                                                         |
| `refreshInterval` | number | `3000`                           | Milliseconds between refreshes of the nearby player list while the panel is open.           |

## Fake IDs · `fakeId`

| Option     | Type    | Default     | What it does                                                                                          |
| ---------- | ------- | ----------- | ----------------------------------------------------------------------------------------------------- |
| `enabled`  | boolean | `true`      | `false` stops the generator from producing cards.                                                     |
| `itemName` | string  | `'fake_id'` | Item given to the player. It must exist in your inventory with `export = 'cuxial_license.useFakeId'`. |

{% hint style="info" %}
The fake ID panel has no command and no NPC. Open it from your own resource with [`openFakeId`](/scripts/core/cuxial-license/developers.md#openfakeid), for example from a hidden location or an item.
{% endhint %}

## Card options in the designer

Each card design carries its own options, set in the last step of the designer (`/license`):

| Option                      | What it does                                                                                                           |
| --------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **Restrict to job**         | Takes the card out of the licence office. It can then only be issued by hand.                                          |
| **Charge money** and amount | Puts the card on sale at the licence office for that price.                                                            |
| **Item name**               | Inventory item handed out for this card. Empty = `license_card`. The designer shows the item definition ready to copy. |

Who can issue a card is decided by `authorizedJobs`.

{% hint style="danger" %}
Deleting a card design also deletes every licence issued from it. The items stay in the inventories but no longer show anything.
{% endhint %}

## Common changes

**Charge the bank account instead of cash**

```lua
paymentType = 'bank',
```

**Let a lower rank issue cards**

```lua
authorizedJobs = {
    ['police'] = 1,
},
```

**Turn fake IDs off**

```lua
fakeId = {
    enabled = false,
    itemName = 'fake_id',
},
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.cuxial.com/scripts/core/cuxial-license/configuration.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
