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

# Bunny MultiJob

***

### ✨ Features

* ✅ Allow players to **switch jobs using `/jobs`**
* ✅ Allow admins to **add/remove jobs for any player**
* ✅ Prevent duplicate jobs in the database
* ✅ Automatically sync jobs on player load
* ✅ **Discord logs** for job add/remove actions
* ✅ Optimized and restart-safe

***

### 📦 Requirements

Make sure the following resources are installed and running:

* **es\_extended**
* **ox\_lib**

***

### 📥 Installation

1. **Unzip** the file

   ```
   bunny_multijob.pack.zip
   ```
2. **Import the SQL** file into your database\
   (This will create the required tables and indexes)
3. **Ensure the script** in your `server.cfg`

   ```cfg
   ensure bunny_multijob
   ```
4. Restart your server

***

### ⚙️ Configuration

Open `config.lua` to configure commands, admin groups, and Discord logs.

#### Commands

```lua
Config.Command = 'jobs'
Config.AdminCommand = 'managejobs'
```

#### Admin Groups

```lua
Config.AdminGroups = {
    admin = true,
    superadmin = true
}
```

#### Default Job

```lua
Config.DefaultJob = { name = 'unemployed', grade = 0 }
```

***

### 🎮 How to Use

#### 👤 Player Commands

**Switch jobs**

```
/jobs
```

* Opens a menu showing all jobs assigned to the player
* Selecting a job switches the player instantly

***

#### 🛠️ Admin Commands

**Manage player jobs**

```
/managejobs
```

Admins can:

* View all online players
* Add a job to a player
* Remove a job from a player
* Automatically set player to the **default job** when their current job is removed

***

### 🧾 Discord Logs

Bunny MultiJob supports **Discord webhook logging** for job actions.

#### Logged Actions

* Admin added a job to a player
* Admin removed a job from a player

#### Setup Discord Logs

1. Create a Discord webhook
2. Open `config.lua`
3. Add your webhook URL:

```lua
Config.DiscordWebhook = "YOUR_DISCORD_WEBHOOK_HERE"
```

***

### 🧠 Notes

* Jobs are **inserted only once** (duplicate protection)
* Jobs persist after **server restart**
* Script is compatible with **ESX Legacy**
* Uses **ox\_lib menus & callbacks**

***

### 🧩 Support

If you encounter issues or want custom features:

* Ensure `es_extended` and `ox_lib` are up to date
* Check server console logs
* Verify SQL was imported correctly

***

### 🐇 Bunny Scripts

Built for performance, stability, and clean RP experience.

**Enjoy Bunny MultiJob!** 🚀


---

# 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:

```
GET https://bunny-store.gitbook.io/bunny-store-docs/bunny-multijob.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
