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

# Installation

> Standard install flow for any APEX script.

Every APEX script follows the same install pattern. Once you've done it for one, you've done it for all of them.

## Prerequisites

<Info>
  APEX scripts target ESX Legacy (and ESX 1.x). You should already have `es_extended`, `ox_lib`, and `oxmysql` running before importing any APEX script.
</Info>

## Steps

<Steps>
  <Step title="Get the resource">
    Buy the script on Tebex and download the build from your keymaster / escrow account. APEX uses CFX escrow — keymaster ties the asset to your server license.
  </Step>

  <Step title="Drop into resources">
    Extract the folder into your `resources/` directory. The folder name must match the resource name in `fxmanifest.lua` (already set correctly out of the box).
  </Step>

  <Step title="Add to server.cfg">
    Add `ensure apex-<script-name>` after `es_extended`, `ox_lib`, and `oxmysql`. APEX scripts that depend on other APEX scripts (for example `apex-caretaker-app` requires `apex-caretaker`) declare this in their `fxmanifest.lua`.
  </Step>

  <Step title="Restart the server">
    On first start, scripts that need a database table create it automatically via `oxmysql`. There's no manual SQL import unless a script explicitly ships a `sql.sql` for items.
  </Step>

  <Step title="Edit config and hooks">
    Open `config.lua` to set positions, prices, and feature toggles. Open `hooks.lua` (where present) to wire your notify system, anti-cheat, dispatch, garage, or quest backend.
  </Step>
</Steps>

## Boot order

<Note>
  Place APEX scripts after their dependencies.

  ```cfg server.cfg theme={null}
  ensure oxmysql
  ensure ox_lib
  ensure es_extended
  ensure ox_inventory
  ensure ox_target
  ensure skinchanger
  ensure esx_skin
  ensure lb-phone
  ensure saltychat

  # APEX progressbar overrides ox_lib's progress UI; load early
  ensure apex-progressbar

  # APEX scripts (any order)
  ensure apex-faction-bell
  ensure apex-aduty
  # ...
  ```
</Note>

## Items and inventory

Scripts that introduce inventory items list them in their per-script page. For `ox_inventory`, add the item definitions to `resources/[inventory]/ox_inventory/data/items.lua`. The script's `config.lua` documents which item names it expects (for example `caller_item`, `tablet_robberies`, `kreissaege`).

## Verifying the install

<Check>
  After `restart apex-<script>`, watch the console for:

  * `[apex-<script>] DB tables ready` (if applicable)
  * No red `ERROR` lines from `fxmanifest.lua`
</Check>

If you see escrow errors at start, the asset wasn't imported correctly via keymaster. \
Ensure you have set the proper cfx license key in your server config or you have restarted the server.
