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

# Trap Phone Installation Guide

> Step-by-step instructions for installing the arc-trapphone resource, including dependencies, inventory item setup, images, and server.cfg configuration.

`arc-trapphone` is the Archon trap phone resource for trap phone usage, payphone interactions, and bridge-based compatibility for framework, inventory, and interaction handling. This guide covers the required dependencies, inventory item setup, image placement, and startup order.

<Info>
  By default, `arc-trapphone` auto-detects your supported framework, notification system, UI, inventory, interaction mode, and target resource. Most supported setups do not require any configuration changes before first startup.
</Info>

<Steps>
  <Step title="Install (or update) dependencies">
    <Warning>
      Verify all dependencies below are started **before** this script in your `server.cfg`.
    </Warning>

    <CardGroup cols={2}>
      <Card title="oxmysql" icon="arrow-up-right-from-square" href="https://github.com/overextended/oxmysql">
        Download oxmysql
      </Card>

      <Card title="ox_lib" icon="arrow-up-right-from-square" href="https://github.com/overextended/ox_lib">
        Download ox\_lib
      </Card>

      <Card title="ox_inventory" icon="arrow-up-right-from-square" href="https://github.com/overextended/ox_inventory/">
        Download ox\_inventory
      </Card>

      <Card title="ox_target" icon="arrow-up-right-from-square" href="https://github.com/overextended/ox_target">
        Download ox\_target
      </Card>
    </CardGroup>

    <Note>
      `arc-trapphone` auto-detects supported integrations by default.

      Out of the box auto-detect support includes:

      * `ESX` / `QBCore` / `Qbox` / `standalone`
      * `ox_inventory` / `esx` / `qb` / `qbox`
      * `ox_target`, text UI, or custom interaction handling
      * automatic notification and UI detection for supported setups

      Install the resources that apply to your server setup. `oxmysql` and `ox_lib` should be started before `arc-trapphone`

      Alternatively, you could add your own support within `shared/bridge.lua` manually.
    </Note>
  </Step>

  <Step title="Add the required inventory item and images">
    Navigate to the script’s `install` directory and copy the required item data and images into your inventory resource.

    <Tabs>
      <Tab title="ox_inventory">
        Add to: `ox_inventory/data/items.lua`

        ```lua theme={null}
        ['illegal_phone'] = {
            label = 'Illegal Phone',
            weight = 200,
            stack = false,
            close = true,
            description = 'Burner phone for setting up deals.',
        },
        ```

        ```lua theme={null}
        Copy images from: arc-trapphone/install/images
        Insert images into: ox_inventory/web/images
        ```
      </Tab>

      <Tab title="qb-core">
        Add to: `qb-core/shared/items.lua`

        ```lua theme={null}
        illegal_phone = {
            name = 'illegal_phone',
            label = 'Illegal Phone',
            weight = 200,
            type = 'item',
            image = 'illegal_phone.png',
            unique = true,
            useable = true,
            shouldClose = true,
            description = 'Burner phone for setting up deals.',
        },
        ```

        ```lua theme={null}
        Copy images from: arc-trapphone/install/images
        Insert images into:   qb-inventory/html/images
        ```
      </Tab>
    </Tabs>

    <Note>
      The trap phone item and its image must both be added correctly for the resource to function properly.

      Make sure the image filename matches the item name used in your inventory.
    </Note>
  </Step>

  <Step title="Place the resource in your resources folder">
    Create a dedicated subfolder such as `[archon]`, then place `arc-trapphone` inside it.

    Example:

    ```bash theme={null}
    resources/[archon]/arc-trapphone
    ```

    Alternatively, you may place the script in any folder that starts **after** its dependencies in your server’s resource load order.

    <Tip>
      Keeping Archon resources grouped in their own subfolder is recommended for organization, but not required.
    </Tip>
  </Step>

  <Step title="Leave the install files in place">
    You do **not** need to import the included `.sql` file manually. Any included SQL setup is handled automatically where required.

    <Warning>
      Do not remove the `install` folder or any included `.sql` files after setup.
    </Warning>
  </Step>

  <Step title="Optional: review configuration">
    No configuration changes are required for most supported setups.

    By default, the resource auto-detects:

    * Framework
    * Notifications
    * UI
    * Inventory
    * Interaction mode
    * Target resource

    Only review or edit the config if you want to:

    * Force a specific supported integration instead of using auto-detect
    * Use a custom notification, UI, or interaction implementation
    * Disable target usage and use another supported interaction method
    * Apply optional script-specific customizations

    Default detection values:

    ```lua theme={null}
    Config.Framework = 'auto' -- auto / esx / qb / qbox / standalone
    Config.Notification = 'auto' -- auto / ox / esx / qb
    Config.UI = 'auto' -- auto / ox / custom
    Config.Inventory = 'auto' -- auto / ox / esx / qb / qbox
    Config.Interact = 'auto' -- auto / target / textui / custom
    Config.Target = 'auto' -- auto / ox / false
    ```
  </Step>

  <Step title="Update server.cfg">
    Once all other steps are complete, open your `server.cfg` and add `ensure [archon]` to the very bottom of your resource start list.

    ```cfg theme={null}
    ensure [archon]
    ```

    <Note>
      If you are not using an `[archon]` folder, make sure the resource starts only after all required dependencies.
    </Note>
  </Step>

  <Step title="Perform a full server restart">
    After installation is complete, perform a **full server restart**.

    <Warning>
      A full restart is required after installation. Do not rely on a partial restart for first-time setup, as this may cause startup or functionality issues.
    </Warning>
  </Step>
</Steps>
