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

# Quick Fixes & Common Issues

> Troubleshoot common installation and configuration problems with r-scripts

## Common Installation Issues

Most issues with come from missing dependencies or incorrect configuration. Follow these steps to resolve the most common problems.

<Steps>
  <Step title="Check Dependencies">
    Ensure all required dependencies are installed and started **before** your r-script resource.

    ### Required for most scripts scripts:

    * **ox\_lib** - UI and utilities
    * **oxmysql** - Database operations

    ### Frameworks:

    * **es\_extended** (ESX)
    * **qb-core** (QBCore)
    * **qbx\_core** (QBX)
  </Step>

  <Step title="Configure Your Framework">
    Open the `config.lua` file in each script and set your framework correctly.

    **For ESX:**

    ```lua theme={null}
    R.Framework = "ESX"
    R.newESX = true -- Set to false for ESX 1.1
    R.CoreName = "es_extended" -- Your core resource name
    ```

    **For QBCore:**

    ```lua theme={null}
    R.Framework = "qbcore"
    ```

    **For QBX:**

    ```lua theme={null}
    R.Framework = "qbx"
    ```
  </Step>

  <Step title="Import SQL Files">
    Some scripts have `.sql` files that must be imported into your database.

    **Option 1: Manual Import**

    * Open your database management tool (HeidiSQL, etc.)
    * Import the `.sql` file from each script folder

    **Option 2: Auto-Insert (suggested)**

    * Set `R.EnableAutoinsert = true` in config.lua
    * Start the resource once to create tables automatically
    * Set it back to `false` after first start (if you wish)
  </Step>
</Steps>

## Script-Specific Issues

<AccordionGroup>
  <Accordion title="R_Store - Credits not updating" icon="store">
    **Problem:** Player credits don't update after purchase or admin command.

    **Solutions:**

    1. Check that oxmysql is properly installed and running
    2. Verify database tables exist:
       * `r_store_players`
       * `r_store_purchases`
    3. Check server console for SQL errors
  </Accordion>

  <Accordion title="R_FFA - Players stuck in arena" icon="crosshairs">
    **Problem:** Players can't leave the FFA arena.

    **Solutions:**

    1. Use the leave command:

       ```
       /ffaleave
       ```
    2. Check that the command is configured:

       ```lua theme={null}
       R.Commands = {
           leave = "ffaleave",
       }
       ```
    3. Verify the arena zone configuration is correct
    4. Check for errors in when leaving
  </Accordion>
</AccordionGroup>

## Still Having Issues?

If you've tried all the solutions above and still experiencing problems:

<CardGroup cols={2}>
  <Card title="Join Discord Support" icon="discord" href="https://discord.gg/rscripts">
    Get help from our community and staff
  </Card>

  <Card title="Check Documentation" icon="book" href="/">
    Read detailed guides for each script
  </Card>
</CardGroup>

<Tip>
  When asking for support, always include:

  * Your framework (ESX/QBCore/QBX)
  * Your inventory system
  * Server console errors
  * What you've already tried
</Tip>
