> For the complete documentation index, see [llms.txt](https://rickys-organization-6.gitbook.io/hwc-documentions/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rickys-organization-6.gitbook.io/hwc-documentions/hwc-seat-switcher.md).

# HWC Seat Switcher

## 🚗 HWC Seat Switcher

#### Installation & Configuration Guide

A lightweight, optimized seat-switching system for QBCore that allows players to move between vehicle seats instantly with a simple command.

***

### 📦 Installation

Follow these steps to install **HWC Seat Switcher** on your server:

#### 1. Download the Resource

Download the `hwc-seatswitcher` folder from your Tebex purchase or release package.

***

#### 2. Place in Resources Folder

Move the folder into your server’s resources directory:

```
resources/[standalone]/hwc-seatswitcher
```

> 📌 You can place it in any folder — `[standalone]` is just recommended for organisation.

***

#### 3. Add to server.cfg

Add the following line to your `server.cfg`:

```
ensure hwc-seatswitcher
```

***

#### 4. Restart Server

Restart your server or run:

```
refresh
ensure hwc-seatswitcher
```

***

### ⚙️ Configuration

All configuration is handled directly inside:

```
client.lua
```

***

#### Available Settings

| Setting     | Default | Description                                   |
| ----------- | ------- | --------------------------------------------- |
| `MAX_SEATS` | `12`    | Maximum number of seats players can switch to |
| `disabled`  | `false` | Set to `true` to disable the script entirely  |

***

#### Example Configuration

```
local MAX_SEATS = 12
local disabled = false
```

***

### 🎮 Usage

Players can switch seats using the command:

```
/seat [1-12]
```

***

#### Seat Mapping

| Seat       | Position                |
| ---------- | ----------------------- |
| **1**      | Driver                  |
| **2**      | Front Passenger         |
| **3 - 12** | Rear / Additional Seats |

***

#### Example Commands

```
/seat 1
```

→ Move to driver seat

```
/seat 2
```

→ Move to passenger seat

```
/seat 4
```

→ Move to rear seat

***

### 🧠 Features Explained

#### Multi-Seat Support

Supports up to 12 seats including buses and larger vehicles.

***

#### Smart Validation

The script automatically checks:

* If the player is inside a vehicle
* If the seat exists
* If the seat is already occupied

***

#### No Auto Shuffle

Prevents GTA from automatically moving players between seats.

> Can be toggled inside the script if needed.

***

#### Optimised Performance

* Runs at **0.00ms idle**
* Uses local variables for efficiency
* No unnecessary loops or heavy logic

***

#### QBCore Integration

* Uses QBCore notifications
* Adds chat suggestions automatically
* Native feel with your server

***

### 🧩 Dependencies

#### Required

* **qb-core**

***

#### Optional (Recommended)

* **qb-notifications**

> If not installed, the script will still function but may use fallback notifications.

***

### 🛠️ Troubleshooting

#### Command not working

* Ensure the resource is started:

```
ensure hwc-seatswitcher
```

***

#### No notifications showing

* Make sure `qb-core` is running correctly
* Install `qb-notifications` if desired

***

#### Player not switching seats

* Check if the seat is already occupied
* Ensure the vehicle supports that seat index

***

### 💡 Notes

* Works with **all standard GTA vehicles**
* Fully compatible with QBCore-based servers
* Designed to be **simple, fast, and reliable**


---

# 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://rickys-organization-6.gitbook.io/hwc-documentions/hwc-seat-switcher.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.
