> 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/es/interfaz/cuxial-anuncios/commands.md).

# Comandos y permisos

Los dos comandos de Cuxial Anuncios y quién puede usar cada uno.

Cuxial Anuncios tiene dos comandos: uno para los jugadores y otro para el staff. Los dos nombres se pueden cambiar en `shared/config.lua`.

## Comandos

| Comando              | Quién                                  | Qué hace                                                                                          |
| -------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------- |
| `/anuncio <mensaje>` | Jugadores cuyo trabajo tiene un estilo | Envía el mensaje a todos los jugadores del servidor, con el estilo del trabajo de quien lo envía. |
| `/crearanuncio`      | Staff con `adminPermission`            | Abre el panel para crear, editar y borrar estilos.                                                |

`<mensaje>` es obligatorio.

### Cómo se comporta `/anuncio`

* El estilo se elige por el nombre del trabajo actual del jugador. No se comprueba si está de servicio ni su rango: cualquier miembro del trabajo puede anunciar.
* Si el trabajo no tiene estilo, el jugador recibe una notificación de error y no se envía nada.
* Después de enviar, el jugador debe esperar `cooldown` segundos (30 por defecto) antes del siguiente anuncio. La espera es por jugador.
* Los anuncios se ponen en cola en la pantalla de cada jugador. Se muestra uno cada vez, durante `duration` milisegundos, con una pausa corta antes del siguiente.

## Teclas

El script no registra ninguna tecla.

## Permisos

Abrir el panel y guardar o borrar estilos exige el permiso indicado en `adminPermission`, `'admin'` por defecto. La comprobación se hace en el servidor a través de Cuxial Bridge, así que depende de tu framework:

{% tabs %}
{% tab title="QBox / QBCore" %}
El valor se pasa a la comprobación de permisos del propio framework. Usa un permiso que ya exista en tu servidor, como el que tu framework usa para sus comandos de administración.
{% endtab %}

{% tab title="ESX" %}
`'admin'` vale para los jugadores de los grupos `admin` y `superadmin`. Cualquier otro valor tiene que ser el nombre exacto del grupo del jugador.
{% endtab %}
{% endtabs %}

{% hint style="info" %}
El script no añade permisos ACE propios, y `/anuncio` no necesita ninguno. Poder usarlo depende solo de que el trabajo del jugador tenga un estilo.
{% 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/es/interfaz/cuxial-anuncios/commands.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.
