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

# Installation

> Step-by-step setup for RoadPhone including upload, database, keys, voice, and start order

<Danger>
  **Do not use FileZilla**. It can corrupt or skip hidden files during upload. We recommend **WinSCP**.
</Danger>

<Warning>
  Enter your TebexTransactionID in `API.lua`. The music app will not work without a TebexID.
</Warning>

## 📋 Prerequisites

Before you begin, make sure you have:

<CardGroup cols={2}>
  <Card title="Database Access" icon="database">
    MySQL or MariaDB database with permissions to create tables
  </Card>

  <Card title="FTP Client" icon="server">
    WinSCP or similar (not FileZilla)
  </Card>

  <Card title="Fivemanage" icon="cloud">
    Valid API key from Fivemanage for media uploads
  </Card>

  <Card title="Discord Webhooks" icon="discord">
    Valid Discord webhooks for logging
  </Card>
</CardGroup>

## 🚀 Setup Instructions

<Steps>
  <Step title="Create Resource Folder">
    Create a folder named `[phone]` inside your server's `resources` directory.

    Extract all scripts from the download into the `[phone]` folder.
  </Step>

  <Step title="Import Database">
    Import the `roadphone.sql` file into your database.

    <Warning>
      If you don't import the SQL file, you will see a `/fixphone` message in-game.
    </Warning>
  </Step>

  <Step title="Configure API">
    <Warning>
      The script will not work without a valid key.
    </Warning>

    * Open <code>API.lua</code> and enter your **TebexTransactionID** and your **Fivemanage** API key.

    **Where to find your Transaction ID:**

    * Check your purchase confirmation email from Tebex
    * Or log in to view your payment history:

    <Card title="Tebex Payment History" href="https://checkout.tebex.io/payment-history/login" icon="receipt" iconType="solid">
      View and retrieve your transaction ID from past purchases
    </Card>

    * **optional**: Add your **Discord webhooks** in <code>API.lua</code>.
  </Step>

  <Step title="Configure Voice Chat">
    Edit `roadphone/config.lua` to set up your voice chat system.

    <Warning>
      If you don't configure voice chat in config.lua, calling and radio features will not work.
    </Warning>

    **Optional**: Add Discord webhooks in `API.lua` for logging.
  </Step>

  <Step title="Update Server Config">
    Open `server.cfg` and add these lines **after** your framework (`es_extended`, `qb-core`, or `qbox`):

    ```cfg theme={null}
    ensure xsound
    ensure roadphone
    ```

    <Info>
      The load order is important. Always load the phone after your core framework and dependencies.
    </Info>
  </Step>
</Steps>

## 🛡️ Anti-Cheat Configuration

<Tip>
  If you use an anti-cheat system, whitelist these phone props:

  * `phonesilver`
  * `phonepurple`
  * `phonegreen`
  * `phonelightblue`
  * `phonered`
  * `phoneblack`
</Tip>

<Check>
  Installation complete! Restart your server and the RoadPhone system should be operational.
</Check>

## 🔧 Troubleshooting

<AccordionGroup>
  <Accordion title="Script not starting">
    * Verify all dependencies are installed
    * Check server console for error messages
    * Ensure the resource folder structure is correct
  </Accordion>

  <Accordion title="Database errors">
    * Confirm database credentials are correct
    * Check if the SQL file was imported successfully
  </Accordion>
</AccordionGroup>

## 📚 Next Steps

<CardGroup cols={2}>
  <Card title="FAQ" icon="badge-info" href="/roadphone/faq">
    Any problems or questions?
  </Card>

  <Card title="CustomApps" icon="pickaxe" href="/roadphone/custom-apps">
    Learn how to create custom apps
  </Card>
</CardGroup>
