> 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/interface/cuxial-anuncios/configuration.md).

# Configuration

Every option of Cuxial Announcements: the config file and the styles created in game.

Cuxial Announcements is adjusted in two places: `shared/config.lua` for the commands and timings, and the in-game panel for the look of each job's announcements.

## Config file

Restart the resource after any change.

| Option            | Type         | Default          | What it does                                                                                                                                                        |
| ----------------- | ------------ | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `command`         | string       | `'anuncio'`      | Name of the command players use to send an announcement.                                                                                                            |
| `adminCommand`    | string       | `'crearanuncio'` | Name of the command that opens the style panel.                                                                                                                     |
| `adminPermission` | string       | `'admin'`        | Permission needed to open the panel and to create, edit or delete styles. See [Commands & permissions](/scripts/interface/cuxial-anuncios/commands.md#permissions). |
| `cooldown`        | number       | `30`             | Seconds a player must wait between two announcements. `0` removes the wait.                                                                                         |
| `duration`        | number       | `15000`          | Time each announcement stays on screen, in milliseconds.                                                                                                            |
| `accentColor`     | string (hex) | configurable     | Accent colour of the style panel. It does not change the announcements.                                                                                             |

### Example

Rename the commands and allow one announcement per minute:

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

```lua
return {
    command = 'announce',
    adminCommand = 'announcestyles',
    adminPermission = 'admin',
    cooldown = 60,
    duration = 15000,
    accentColor = '#e53935',
}
```

{% endcode %}

## Announcement styles

Styles are not in a file. Staff create them in game with the panel command, and they are stored in the database table `cuxial_anuncios`. A change applies to the next announcement; no restart is needed.

There is one style per job. Saving a new style for a job that already has one replaces it.

### General

| Field                         | What it is                                                                                                                                          |
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| Title                         | Text shown as the heading of the announcement. Required. Up to 100 characters.                                                                      |
| Job                           | Internal name of the job, for example `police`. Required. It must match the job name of your framework exactly, not its label. Up to 50 characters. |
| Logo image                    | A file name or a full `http(s)` URL.                                                                                                                |
| Logo layer, size and position | Where the logo sits: inside the template, in front of the card or behind it; its size and offset.                                                   |
| Background image              | A file name or a full `http(s)` URL, with its opacity.                                                                                              |
| Colours                       | Title colour, title background, text colour and background colour.                                                                                  |

### Design

| Field            | What it is                                                                                                                                                     |
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Template         | One of 11 layouts for the card.                                                                                                                                |
| Screen position  | One of 8 anchors: the four corners, top centre, bottom centre, centre left and centre right.                                                                   |
| Animation        | One of 16 entry animations.                                                                                                                                    |
| Logo mask        | Shape that crops the logo: circle, hexagon, star and others.                                                                                                   |
| Font             | The template font or one of 8 alternatives.                                                                                                                    |
| Sound and volume | A file name or a full `http(s)` URL, and a volume from 0 to 100. Empty plays the default sound.                                                                |
| Effects          | Background gradient, animated border, shimmer, accent line, diagonal stripes and glow. Each one is switched on separately and has its own colour and settings. |

### Using your own images and sounds

A value that starts with `http://` or `https://` is loaded as a URL. Anything else is treated as a file name inside the resource:

| Field            | Folder                         |
| ---------------- | ------------------------------ |
| Logo image       | `web/build/images/icons/`      |
| Background image | `web/build/images/background/` |
| Sound            | `web/build/sounds/`            |

The package includes the background `background.jpg` and the default sound `anuncio.ogg`. Create the `web/build/images/icons/` folder for your logos if it is not there. After adding files, restart the resource so players download them.

{% hint style="warning" %}
Updating the script replaces the resource folder. Keep a copy of the images and sounds you added and put them back after each update. Styles are safe: they live in the database.
{% endhint %}


---

# 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/interface/cuxial-anuncios/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.
