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

# Configuration

#### `shared/config.lua` — every setting <a href="#izzy-airdrop-configuration-shared-config-lua-every-setting" id="izzy-airdrop-configuration-shared-config-lua-every-setting"></a>

This file is **safe to share** with players (no webhooks). Restart resource after edits.

### General <a href="#izzy-airdrop-configuration-general" id="izzy-airdrop-configuration-general"></a>

| Key                 | What it does                                                                                                                                  |
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `ServerCallbacks`   | Internal table. **Do not delete.**                                                                                                            |
| `Language`          | UI + notifications language: `en`, `tr`, `es`, `fr`, `de`, `pt`, `ru`, `ar`, `zh`, `ja`.                                                      |
| `UseCharacterNames` | `true` = show RP first/last name in loot UI. `false` = Steam name.                                                                            |
| `ItemImagePath`     | Where NUI loads item pictures from. Must match your inventory resource path. Examples: `qb-inventory/html/images`, `ox_inventory/web/images`. |

#### `Target` <a href="#izzy-airdrop-configuration-target" id="izzy-airdrop-configuration-target"></a>

| Key      | What it does                                                           |
| -------- | ---------------------------------------------------------------------- |
| `Enable` | `true` = use target eye on crate. `false` = press **\[E]** near crate. |
| `Name`   | Target resource name, e.g. `qb-target`, `ox_target`.                   |
| `Icon`   | Font Awesome icon for target option.                                   |

#### `Redzone` <a href="#izzy-airdrop-configuration-redzone" id="izzy-airdrop-configuration-redzone"></a>

Draws a zone at the **landing point** (not where the crate hangs in the air).<br>

| Key                       | What it does                                                                                                                                                          |
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Enable`                  | Turn redzone on/off.                                                                                                                                                  |
| `Radius`                  | Meters around target coords.                                                                                                                                          |
| `BlipEnable`              | Red circle blip on map.                                                                                                                                               |
| `BlipColor` / `BlipAlpha` | Map circle color and transparency.                                                                                                                                    |
| `AirdropBlip`             | Pin icon at drop (sprite, color, scale, name).                                                                                                                        |
| `Marker`                  | 3D sphere/ring in world. `DrawSphere` = ball, `DrawGroundRing` = line on ground.                                                                                      |
| `BucketRouting`           | **Advanced.** Puts players inside zone in a separate **routing bucket** so only they see each other. Usually leave `Enable = false` unless you know what buckets are. |

#### **BucketRouting sub-keys:**

| Property            | Description                                                              |
| ------------------- | ------------------------------------------------------------------------ |
| `Mode = "per_drop"` | `Mode = "per_drop"` → each crate gets its own bucket number.             |
| `Mode = "static"`   | `Mode = "static"` → everyone in any redzone goes to bucket `StaticId`.   |
| `PerDropBase`       | `PerDropBase` + `PerDropModulo` → formula for bucket ID per drop entity. |
| `CheckIntervalMs`   | `CheckIntervalMs` → how often client checks “am I inside the zone        |

#### `DropData` <a href="#izzy-airdrop-configuration-dropdata" id="izzy-airdrop-configuration-dropdata"></a>

| Key                  | What it does                                                |
| -------------------- | ----------------------------------------------------------- |
| `DropProps.normal`   | Prop model for normal drops (`gen_crate`).                  |
| `DropProps.job`      | Prop model for job drops (`gen_crate2`).                    |
| `ShowFlareOnDrop`    | Red smoke on crate after landing (normal/job).              |
| `ShowFlareOnVehicle` | Smoke on vehicle drop after landing.                        |
| `FallSpeed`          | How fast crate moves down each tick (higher = faster fall). |

#### Timing & cleanup <a href="#izzy-airdrop-configuration-timing-cleanup" id="izzy-airdrop-configuration-timing-cleanup"></a>

| Key                                | What it does                                                    |
| ---------------------------------- | --------------------------------------------------------------- |
| `PlaneArrivalTimeSecond`           | Delay before plane appears (flare path).                        |
| `DropUnlock.Enabled`               | If `true`, crate locked until timer after landing.              |
| `DropUnlock.Seconds`               | Wait time in **seconds** after land (if `UseCountdown = true`). |
| `DropUnlock.Time`                  | Old setting in **milliseconds** if countdown disabled.          |
| `DropCleanup.RemoveOnFirstLoot`    | Delete crate immediately when someone loots.                    |
| `DropCleanup.AutoDeleteIfUnlooted` | Delete if nobody opens it in time.                              |
| `DropCleanup.UnlootedDeleteAfter`  | Ms until unlooted delete (`600000` = 10 minutes).               |

#### `ChatMessage` (when someone loots) <a href="#izzy-airdrop-configuration-chatmessage-when-someone-loots" id="izzy-airdrop-configuration-chatmessage-when-someone-loots"></a>

| Key                     | What it does                                                                                    |
| ----------------------- | ----------------------------------------------------------------------------------------------- |
| `ReceiveItem`           | Send a server-wide message on loot.                                                             |
| `ListLootedItems`       | Message includes item names or just “X looted a drop”.                                          |
| `BroadcastAs`           | `chat` = chat message, `notify` = QB notify, `txannounce` = txAdmin announce (needs `monitor`). |
| `ShowCharNameOnMessage` | IC name vs Steam name in that message.                                                          |
| `TxAnnounceAuthor`      | Title shown on txAdmin announce.                                                                |

#### `Notification` <a href="#izzy-airdrop-configuration-notification" id="izzy-airdrop-configuration-notification"></a>

| Key         | What it does                                                      |
| ----------- | ----------------------------------------------------------------- |
| `DropLeave` | Top-right NUI popup when crate leaves plane (“airdrop incoming”). |

#### `AdminUI` <a href="#izzy-airdrop-configuration-adminui" id="izzy-airdrop-configuration-adminui"></a>

| Key                     | What it does                                                                                                                                                 |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `CreateDropCommand`     | Chat command **name** for the admin create-drop panel (no `/`, no spaces). Default `createdrop` → players type `/createdrop`. Restart resource after change. |
| `HistoryPollIntervalMs` | How often the history tab refreshes (ms). Higher = less server load.                                                                                         |

#### `AntiSpam` <a href="#izzy-airdrop-configuration-antispam" id="izzy-airdrop-configuration-antispam"></a>

| Key                     | What it does                                |
| ----------------------- | ------------------------------------------- |
| `Enable`                | Cooldown + max drops.                       |
| `CreateCooldownSeconds` | Wait between admin/manual drops per player. |
| `MaxActiveDrops`        | Max crates on server at once.               |

#### `AntiCheat` <a href="#izzy-airdrop-configuration-anticheat" id="izzy-airdrop-configuration-anticheat"></a>

| Key               | What it does                                                         |
| ----------------- | -------------------------------------------------------------------- |
| `Enable`          | Server checks distance when looting.                                 |
| `MaxLootDistance` | Meters from drop center; farther = rejected (stops remote exploits). |

#### `JobDrops` <a href="#izzy-airdrop-configuration-jobdrops" id="izzy-airdrop-configuration-jobdrops"></a>

For drop type **“Job Drop”** in admin UI (you type job name like `police`).

| Key                     | What it does                                                                                                                   |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `Enable`                | Job-only visibility rules on.                                                                                                  |
| `HideEntity`            | Wrong job: crate invisible on their game.                                                                                      |
| `HideBlip`              | Wrong job: no blip/redzone for them.                                                                                           |
| `AllowAdminCreatorView` | Admin who spawned it still sees crate even if wrong job; they do **not** get the “incoming” notify unless they’re on that job. |
| `CaseInsensitive`       | `police` = `Police`.                                                                                                           |

#### `DropItems` <a href="#izzy-airdrop-configuration-dropitems" id="izzy-airdrop-configuration-dropitems"></a>

**Loot tables for flare gun + scheduled drops only.** Admin UI picks items manually.

| Property  | Description                                                                                             |
| --------- | ------------------------------------------------------------------------------------------------------- |
| `[1]`     | `[1]`, `[2]`, … = tiers. Script picks **one random tier**, then all items in that tier go in the crate. |
| Each item | `name` (spawn name), `label`, `amount`, `image` (path for UI).                                          |

`math.random` in config runs when the file loads — for per-drop random amounts, change logic in server code or use fixed numbers.

#### `RandomDrops` <a href="#izzy-airdrop-configuration-randomdrops" id="izzy-airdrop-configuration-randomdrops"></a>

Automatic plane events.

| Key                                  | What it does                                               |
| ------------------------------------ | ---------------------------------------------------------- |
| `Enabled`                            | On/off.                                                    |
| `ScheduleTimes`                      | List like `"20:00"` — exact server time once per day.      |
| `ScheduleHours`                      | Alternative: only hour number; uses `FireWindowMinutes`.   |
| `CheckInterval`                      | How often server checks the clock (ms).                    |
| `FireWindowMinutes`                  | For `ScheduleHours` only: fire if current minute is 0,1,2… |
| `Coords`                             | List of `vector3` — one random spot per event.             |
| `RequiredPlayerCountForRandomPlanes` | Min players online (0 = always run).                       |

#### Other <a href="#izzy-airdrop-configuration-other" id="izzy-airdrop-configuration-other"></a>

| Key                  | What it does                                           |
| -------------------- | ------------------------------------------------------ |
| `PlaneSpawnDistance` | How far away the plane spawns before flying to target. |

#### `server/config.lua` — secrets & admins <a href="#izzy-airdrop-configuration-server-config-lua-secrets-admins" id="izzy-airdrop-configuration-server-config-lua-secrets-admins"></a>

**Do not leak this file.** Webhooks and tokens go here.

| Key                    | What it does                                                                                                                                                                  |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Mysql`                | `oxmysql`, `ghmattimysql`, or `mysql-async` — must match what your server uses.                                                                                               |
| `QBDefaultGarage`      | Garage name written to DB when someone wins a **vehicle drop** (QB).                                                                                                          |
| `DiscordBotToken`      | Bot token from Discord Developer Portal. Used to show **player avatar** in loot UI. Optional if you don’t care about avatars.                                                 |
| `CamScreenshotWebhook` | Discord webhook URL for **cammode** only. Screenshot uploads here, then server downloads image and saves `html/cars/modelname.png`.                                           |
| `WebhookBotName`       | Display name on Discord embeds from `webhooks.lua`.                                                                                                                           |
| `Webhooks.DropCreate`  | Log when admin/flare creates a drop.                                                                                                                                          |
| `Webhooks.RandomDrop`  | Log when **scheduled** automatic drop spawns.                                                                                                                                 |
| `Webhooks.DropLoot`    | Log when someone takes loot.                                                                                                                                                  |
| `Admins`               | Who can use the admin create-drop command (`AdminUI.CreateDropCommand`, default `/createdrop`), `/cammode`, and create drops from UI. Steam or license, examples in comments. |

Webhook URL must look like: `https://discord.com/api/webhooks/123456/abcdef...` (or `canary.discord.com` — same thing).

***

#### `server/webhooks.lua` — Discord logging <a href="#izzy-airdrop-configuration-server-webhooks-lua-discord-logging" id="izzy-airdrop-configuration-server-webhooks-lua-discord-logging"></a>

**Not** the same as cammode webhook.

This file sends **rich embeds** to Discord when:

1. **Drop created** → `DropCreate` or `RandomDrop` webhook (depending on scheduled or manual).
2. **Drop looted** → `DropLoot` webhook.

Each message includes stuff like:

* Drop name, type, coords, items inside
* Who created / who looted (character name, citizenid, steam, discord, license)
* Footer: `dropId=5 - tqdev` (fixed branding)

Logo on embeds is hardcoded in this file (`WebhookLogoUrl`).

If webhook URL is wrong, you’ll see a **server console** warning — drop still works, just no Discord log.

***

#### `server/givecar.lua` — vehicle drops & database <a href="#izzy-airdrop-configuration-server-givecar-lua-vehicle-drops-database" id="izzy-airdrop-configuration-server-givecar-lua-vehicle-drops-database"></a>

When drop type is **Vehicle**, the crate is a car on a parachute. When a player claims it:

1. This file runs `GiveAirdropVehicleToPlayer(source, model, plate)`.
2. It **INSERT**s a row into your garage table.

**QBCore / QBX:**

| Property                       | Description                                                                          |
| ------------------------------ | ------------------------------------------------------------------------------------ |
| Table                          | `player_vehicles`                                                                    |
| Stores                         | license, citizenid, vehicle spawn name, hash, plate, garage, `state = 1` (in garage) |
| `ServerConfig.QBDefaultGarage` | Garage name from `ServerConfig.QBDefaultGarage`                                      |

**ESX:**

| Property | Description                                        |
| -------- | -------------------------------------------------- |
| Table    | `owned_vehicles`                                   |
| Stores   | owner identifier, plate, vehicle JSON, stored flag |

`ExecuteSql` waits until MySQL callback finishes (works with oxmysql / ghmattimysql / mysql-async).

If insert fails, player gets notify “vehicle could not be saved” — fix `Mysql` setting and table columns for your framework version.

***

#### `server/discord.js` — what is this? <a href="#izzy-airdrop-configuration-server-discord-js-what-is-this" id="izzy-airdrop-configuration-server-discord-js-what-is-this"></a>

FiveM can run **JavaScript** on the server. This small file does **one job**:

| Property            | Type | Default | Description                                                                                 |
| ------------------- | ---- | ------- | ------------------------------------------------------------------------------------------- |
| Lua calls           | `—`  | `—`     | `exports['izzy-airdrop']:Discord("discord:123...", { botToken = "...", imageData = true })` |
| JS asks Discord API | `—`  | `—`     | “give me this user’s profile + avatar”                                                      |
| **loot UI**         | `—`  | `—`     | Returns avatar URL (and optional base64) for the **loot UI** profile picture                |

It does **not** send webhooks. It does **not** run cammode.

You need a real **Discord bot token** in `ServerConfig.DiscordBotToken` and the bot must be allowed to read users (standard bot invite).

Also exports `Steam` profile helper — same idea for Steam API if you use it elsewhere.

**Note:** `yarn` / `node_modules` in this resource are for this JS + dependencies (`axios`, `steamhex`).

***

#### Credits <a href="#izzy-airdrop-configuration-credits" id="izzy-airdrop-configuration-credits"></a>

**tqdev** — izzy-airdrop Footer on webhooks: `dropId=X - tqdev`

***

*End of documentation. If something in-game doesn’t match this file, trust the code — this doc is based on the shipped resource structure.*


---

# 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://izzyshop-1.gitbook.io/izzyshop-docs/free-resources/airdrop-system/configuration.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.
