> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shdevelopment.org/llms.txt
> Use this file to discover all available pages before exploring further.

# SH Development Script Dependencies and Requirements

> Learn which external resources SH Development scripts rely on, including ox_lib, oxmysql, PolyZone, and framework-specific integrations.

SH Development scripts declare their external dependencies inside `fxmanifest.lua` using the `dependencies` field. When a required resource is missing or not yet started, the script will either silently fail to initialise or throw errors in your server console. Reviewing the dependency list before installing a new script saves you debugging time and prevents hard-to-trace issues in production.

## How to Check a Script's Dependencies

Open the resource folder and read `fxmanifest.lua`. The `dependencies` block lists every resource that must be running before this script starts:

```lua fxmanifest.lua theme={null}
dependencies {
    'oxmysql',
    'ox_lib',
    'sh-notify',
}
```

This file is always unencrypted and is the definitive source of truth for what each script requires.

## Common Dependencies

The table below covers the dependencies you will encounter most frequently across the SH Development catalogue.

| Resource                   | Required by                                                                    | Notes                                                                   |
| -------------------------- | ------------------------------------------------------------------------------ | ----------------------------------------------------------------------- |
| `oxmysql`                  | Any script with database persistence (trucking XP, vehicle keys, MDT, housing) | Best practice: ensure it before all other resources in `server.cfg`.    |
| `ox_lib`                   | sh-drugs, sh-trucking, sh-npcbartend, and others                               | Provides UI menus, progress circles, and notifications.                 |
| `PolyZone`                 | sh-fishing, sh-drugs, sh-zones, sh-burgershot                                  | Used for geographic zone detection and trigger areas.                   |
| `sh-notify`                | Used as the default notification system in many scripts                        | Can be swapped via `Config.Notify` if you prefer another system.        |
| `bob74_ipl`                | sh-drugs (interior loading)                                                    | Required for meth lab and cocaine lockup interiors to load correctly.   |
| `warmenu`                  | sh-vehiclespawner                                                              | Required for the spawner's radial menu UI.                              |
| `screenshot-basic`         | sh-reports                                                                     | Required to attach in-game screenshots to player reports.               |
| `qb-target` or `ox_target` | Optional in most scripts                                                       | Enables third-eye interaction. Set via `Config.Target` in `config.lua`. |

<Tip>
  When in doubt, open `fxmanifest.lua` in the resource folder. The `dependencies` block there is always authoritative — it reflects exactly what that specific version of the script requires, even if the documentation lags behind an update.
</Tip>

## Ensuring Dependencies in the Correct Order

FiveM starts resources in the order they appear in `server.cfg`. Dependencies **must** be ensured before the scripts that need them. A safe ordering pattern looks like this:

```cfg server.cfg theme={null}
# Core database layer
ensure oxmysql

# Shared libraries
ensure ox_lib
ensure PolyZone

# SH Development notification system
ensure sh-notify

# SH Development scripts
ensure sh-drugs
ensure sh-trucking
ensure sh-reports
```

<Warning>
  If you `ensure` a script before its dependencies are running, it may start without errors but behave incorrectly — menus may not appear, zones may not register, or database writes may fail silently. Always verify your `ensure` order when troubleshooting unexpected behaviour.
</Warning>

## Optional vs. Required Dependencies

Some dependencies are optional and only activate when you enable a related config option:

* **`qb-target` / `ox_target`** — Only needed when `Config.Target` is set to `'qb'` or `'ox'`. If you leave `Config.Target = false`, neither resource is required.
* **`sh-notify`** — Only required when `Config.Notify = 'sh'`. Switch to `'okok'` or `'custom'` and you can remove it from the dependency chain.

Checking which config options activate which dependencies helps you keep your server's resource list lean.
