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

# Commands

Use carwipe commands, the admin panel, and resource exports.

## Commands

| Command              | Who uses it | Description                                                           |
| -------------------- | ----------- | --------------------------------------------------------------------- |
| `/carwipe`           | Admin (ACE) | Opens the modern admin UI panel.                                      |
| `/carwipe [seconds]` | Admin (ACE) | Starts a wipe directly with a custom countdown, skipping the panel.   |
| `/cancelcarwipe`     | Admin (ACE) | Cancels the currently active wipe countdown.                          |
| `/carwipestatus`     | Admin (ACE) | Shows the remaining time of the active wipe (or that none is active). |

All commands (and the equivalent panel actions) go through the same ACE permission check — see `Config.AcePermission` in Configuration.

#### `/carwipe`

* Run **with no arguments** from in-game → opens the admin panel (`yei-carwipe:openAdminPanel`), where staff can see live stats (active vehicle count, total wipes performed, current countdown), start/pause a wipe, and change the default countdown time (persists in memory until the resource restarts).
* Run **with a number** (`/carwipe 60`) → starts a countdown directly with that many seconds, clamped between 30 and 1800.
* Run **from the server console** → always starts directly (the panel only makes sense in-game), using the argument if provided or the default countdown otherwise.

When a wipe starts, every player sees the countdown card (position/colors from `Config.UI`), and the actual cleanup runs once the timer hits zero:

1. Every vehicle is checked — those with a driver or passengers are skipped.
2. Vehicles inside an `IgnoreZones` zone are skipped.
3. Vehicles whose model is in `BlackListVehicles` are skipped.
4. Everything else gets deleted.
5. If `Config.Objects` is enabled, props are cleaned up the same way against `IgnoreZonesObjects`.
6. A completion log is sent to Discord with the number of vehicles (and objects) removed.

#### `/cancelcarwipe`

Immediately stops the active countdown and hides the card for every player. Sends a "canceled" log to Discord.

#### `/carwipestatus`

Sends a chat/notify message with the remaining time in `MM:SS` format, or lets the requester know no wipe is active.

#### Admin Panel actions

The in-game panel (opened via `/carwipe` with no arguments) exposes the same actions through NUI callbacks instead of chat commands:

| Panel action                             | Equivalent to                                                                                                                   |
| ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| Execute Wipe (with optional custom time) | `forceStart` → same as `/carwipe [seconds]`                                                                                     |
| Pause/Stop                               | `stopCarwipe` → same as `/cancelcarwipe`                                                                                        |
| Save (Config tab)                        | `setDefaultTime` → updates the in-memory default countdown used by `/carwipe` with no arguments, the panel, and automatic wipes |

#### Exports

For other resources to integrate with, `yei-carwipe` exposes:

```lua
exports['yei-carwipe']:StartCarwipe(seconds) -- starts a wipe (seconds optional)
exports['yei-carwipe']:StopCarwipe()         -- cancels the active wipe
exports['yei-carwipe']:IsCarwipeActive()     -- returns true/false
exports['yei-carwipe']:GetCountdownTime()    -- returns remaining seconds
```


---

# 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://docs.yeistudios.com/scripts/car-wipe/commands.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.
