> For the complete documentation index, see [llms.txt](https://zynoxdev.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://zynoxdev.gitbook.io/docs/zynox-resources/zx_tsunami/commands.md).

# In-Game Testing

Detailed command usage and admin controls for Zynox Restart Warning

***

## ⚡ Overview

Zynox Restart Warning includes a built-in admin command suite allowing server staff to manually simulate scheduled restart warnings, test audio levels, trigger electrical surges, and trigger the "all-clear" cancellation sequence without waiting for actual txAdmin scheduled restarts.

***

## 🛠️ Command Reference

### 1. Trigger Warning Test

Simulates an emergency restart countdown announcement for a specified number of minutes.

```
/testrestart [minutes]
```

* **Arguments**:
  * `[minutes]` *(Number, required)*: The remaining minutes until restart (e.g. `15`, `10`, `5`, `2`, `1`).
* **Example Usage**:

  ```
  /testrestart 5
  ```
* **What happens when executed**:
  1. **Phase 1 Siren**: Initial high-intensity alert siren (`warning1.ogg`) begins blasting across the server.
  2. **Tension Music**: Background ambient music fades in.
  3. **AI Dispatcher Voice**: The synthesized dispatcher persona speaks: *"Attention citizens. This is an urgent announcement for \[ServerName]. A tsunami alert is in effect, and the server will restart in 5 minutes..."*
  4. **Phase 2 Siren**: Final warning siren (`warning2.ogg`) sounds.
  5. **Grid Failure**: City streetlights begin erratic micro-flickering, surging, and plunging into blackout.
  6. **Vehicle Boost**: Headlights on moving vehicles are illuminated with increased brightness.
  7. **Weather**: Sky smoothly transitions into `THUNDER` stormy atmosphere.

***

### 2. Cancel Active Warning ("All-Clear")

Immediately halts active sirens, turns on power, restores clear skies, and broadcasts a cheerful All-Clear message.

```
/testrestart cancel
```

* **Example Usage**:

  ```
  /testrestart cancel
  ```
* **What happens when executed**:
  1. Immediately cuts off sirens and background tension audio.
  2. Synthesizes the uplifting All-Clear speech: *"Attention everyone, we have wonderful news! The tsunami threat for \[ServerName] has safely passed. The warning is officially lifted..."*
  3. City power grid and streetlights instantly turn back on.
  4. Weather smoothly transitions back to `CLEAR`.
  5. Sends an `[ALL CLEAR]` green chat message to all connected players.

***

## 🔐 ACE Permission Configuration

By default, the command is protected by FiveM's Access Control Entry (ACE) system:

```lua
Config.TestCommand = "testrestart"
Config.TestAcePermission = "command"
```

### In `server.cfg`:

```cfg
# Grant permission to the server admin group
add_ace group.admin command.testrestart allow

# Or grant permission to a specific moderator group
add_ace group.mod command.testrestart allow

# Or grant permission to a specific player's FiveM License
add_principal identifier.license:1234567890abcdef1234567890abcdef12345678 group.admin
```

> \[!NOTE] If a player without ACE permissions attempts to run `/testrestart`, the system silently rejects the request or notifies them in chat that they do not have sufficient privileges.

***

## 🖥️ Server Console Trigger

You can also execute the command directly from the FXServer / txAdmin Live Console without logging into the game:

```
testrestart 5
testrestart cancel
```


---

# 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://zynoxdev.gitbook.io/docs/zynox-resources/zx_tsunami/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.
