> ## 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.

# Common Issues

> Troubleshooting guide for R_Store

## Credits Not Updating

<AccordionGroup>
  <Accordion title="Credits don't update after purchase" icon="coins">
    **Problem:** Player credits don't change after making a purchase or receiving credits from admin.

    **Solutions:**

    <Steps>
      <Step title="Check Database Connection">
        Verify oxmysql is properly installed and connected:

        ```cfg theme={null}
        ensure oxmysql
        ensure r_store
        ```
      </Step>

      <Step title="Verify Database Tables">
        Check that these tables exist in your database:

        * `r_store_players`
        * `r_store_purchases`
      </Step>

      <Step title="Check Server Console">
        Look for SQL errors in your server console.
      </Step>

      <Step title="Make sure you use the command in server console">
        The giveCredits command is a server console command and will only work from there.
      </Step>
    </Steps>
  </Accordion>
</AccordionGroup>

## Purchase Issues

<AccordionGroup>
  <Accordion title="Vehicles not spawning" icon="car">
    **Problem:** Purchased vehicles don't spawn.

    **Solutions:**

    <Steps>
      <Step title="Verify Vehicle Names">
        Ensure vehicle spawn names match your server's vehicle resources. Check the vehicle configuration in the script.
      </Step>

      <Step title="Check Framework Vehicle Function">
        Test if your framework's vehicle spawning works with other resources.
      </Step>

      <Step title="Check Garage Space">
        Some frameworks require garage space. Verify the player has available garage slots.
      </Step>

      <Step title="Check Console Errors">
        Look for errors in server console when purchasing vehicles.
      </Step>
    </Steps>
  </Accordion>

  <Accordion title="Items not received" icon="box">
    **Problem:** Items purchased but not added to inventory.

    **Solutions:**

    * Verify inventory system configuration matches your server:

      ```lua theme={null}
      R.Inventory = "ox_inventory"
      ```
    * Check if inventory is full
    * Ensure item names match your inventory items
    * Check server console for errors
  </Accordion>

  <Accordion title="Weapons not given" icon="gun">
    **Problem:** Weapons purchased but not received.

    **Solutions:**

    * Check inventory system compatibility
    * Ensure inventory has space
  </Accordion>

  <Accordion title="Money not added" icon="dollar-sign">
    **Problem:** Money purchases don't add funds.

    **Solutions:**

    * Check currency configuration:

      ```lua theme={null}
      R.MoneyCurrency = "bank" -- or "cash", "black_money"
      ```
    * Verify the currency type exists in your framework
    * Check server console for errors
  </Accordion>
</AccordionGroup>

## Test Drive Issues

<AccordionGroup>
  <Accordion title="Test drive not starting" icon="car">
    **Problem:** Test drive doesn't spawn vehicle.

    **Solutions:**

    * Check test drive spawn location is valid:

      ```lua theme={null}
      R.TestDrivePos = vector4(-1274.5339, -3389.3430, 13.9401, 329.8687)
      ```
    * Ensure the coordinates are accessible (not in a building or underwater)
    * Verify vehicle model is valid
  </Accordion>
</AccordionGroup>

## Integration Issues

<AccordionGroup>
  <Accordion title="R_Casino integration not working" icon="dice">
    **Problem:** Casino button doesn't appear or doesn't work.

    **Solutions:**

    * Ensure R\_Casino is installed and running
    * Enable casino integration:

      ```lua theme={null}
      R.EnableCasino = true
      R.CasinoResourceName = "r_casino"
      R.CasinoCommand = "casino"
      ```
    * Verify resource name matches exactly
    * Ensure r\_casino is started before r\_store
  </Accordion>

  <Accordion title="R_FFA can't use credits" icon="crosshairs">
    **Problem:** R\_FFA wagers don't use store credits.

    **Solutions:**

    * In R\_FFA config, enable store credits:

      ```lua theme={null}
      R.UseRStoreCredits = true
      R.RStoreResourceName = "r_store"
      ```
    * Ensure resource name matches exactly
    * Restart both resources:

      ```
      restart r_store
      restart r_ffa
      ```
  </Accordion>
</AccordionGroup>

## UI/Display Issues

<AccordionGroup>
  <Accordion title="Images not loading" icon="image">
    **Problem:** Vehicle/item images don't display.

    **Solutions:**

    * Check if image URLs are valid
  </Accordion>
</AccordionGroup>

## Database Issues

<AccordionGroup>
  <Accordion title="Table doesn't exist errors" icon="table">
    **Problem:** SQL errors about missing tables.

    **Solutions:**

    * Import the SQL file manually
    * Or enable auto-insert:

      ```lua theme={null}
      R.EnableAutoinsert = true
      ```
    * Start the resource once again.
  </Accordion>
</AccordionGroup>

## Still Having Issues?

If you've tried all solutions 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="General Quick Fixes" icon="wrench" href="/quickstart">
    Check general troubleshooting guide
  </Card>
</CardGroup>

<Warning>
  When asking for support, always include:

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