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

# Troubleshooting

> Common issues and solutions for the Clothing Script, plus support channels.

import {
  AccordionGroup,
  Accordion,
  CardGroup,
  Card,
  Info,
  Warning,
} from "nextra-theme-docs";

## Troubleshooting Common Issues

<Info>
  Before seeking support, please ensure your server artifacts are up-to-date,
  you've restarted your server after installation/changes, and you've checked
  the F8 client console and server console for specific error messages.
</Info>

<AccordionGroup>
  <Accordion title="Database Issues: `clothing.sql` not importing or errors related to `clothing` table.">
    * **Solution**: Ensure the SQL file (`clothing.sql`) was properly imported
      into your FiveM server's database. - Verify that the database user has the
      necessary permissions (CREATE, ALTER, INSERT, SELECT, UPDATE, DELETE) on the
      database. - Check for any errors during the import process in your database
      management tool (e.g., phpMyAdmin, HeidiSQL).
  </Accordion>

  <Accordion title="Script Not Starting / Errors on Server Start">
    * **Solution**: - Verify that you have correctly added `ensure rs_clothing`
      (or your correct resource folder name) to your `server.cfg`. - Check the
      server console for any error messages when the script attempts to start.
      These messages can provide clues about missing dependencies (like ESX
      itself, esx\_skin, skinchanger) or configuration errors within `config.lua`.
    * Ensure the folder name of the script in your `resources` directory matches
      the name you used in `server.cfg` (case-sensitive on Linux).
  </Accordion>

  <Accordion title="ESX Framework Compatibility Issues">
    * **Solution**: - Confirm that your ESX version is compatible (e.g., ESX
      v1.2, ESX Legacy). Check the script's purchase page or main documentation
      for version requirements. - Make sure `es_extended` (or your ESX base) is
      running correctly and is one of the first resources started in your
      `server.cfg`. - Ensure `esx_skin` and `skinchanger` are installed,
      up-to-date, and functioning correctly as they are crucial dependencies for
      character appearance.
  </Accordion>

  <Accordion title="Dimension Feature Not Working (Players see each other in clothing store)">
    * **Solution**: This feature requires OneSync to be enabled on your server
      and set to `infinity` (e.g., `onesync_enable infinity` in your
      `server.cfg`). Verify your OneSync configuration. - If `Config.Dimension` is
      set to `false` in `config.lua`, this feature will be disabled.
  </Accordion>

  <Accordion title="Clothing Items Not Appearing, Priced Incorrectly, or Missing Categories">
    * **Solution**: - Double-check your `Config.Categories` in `config.lua` for
      correct item IDs (drawable IDs), texture IDs, pricing, and any `Overrides`.
    * Ensure that custom labels and specific settings for items are correctly
      formatted. A misplaced comma or bracket can break parts of the config. -
      Verify that the category IDs (e.g., `arms`, `tshirt_1`) and item IDs are
      valid for the ped models (male/female) being used.
  </Accordion>

  <Accordion title="Clothing Store Markers or Blips Not Showing">
    * **Solution**: - Review the `Config.Locations` section in `config.lua`. -
      Ensure coordinates (`Location = vector4(...)`) are correct for each store. -
      Verify that `ShowMarker = true` and `ShowBlip = true` are set for the
      locations you want visible. - Check that the marker types, blip sprites, and
      colors are valid according to FiveM documentation.
  </Accordion>

  <Accordion title="Cannot Open Menu / Interaction Key Not Working">
    * **Solution**: - Check `Config.OpenMenuKey` in `config.lua` to confirm
      which key is set. - Ensure you are within the `InteractDist` defined for the
      marker in `Config.Locations`. - Look for client-side errors in the F8
      console that might indicate an issue with the key press or menu opening
      function. - Check for resource conflicts if another script is using the same
      key press in the same context.
  </Accordion>
</AccordionGroup>

## Getting Support

If you've gone through the troubleshooting steps and are still experiencing issues:

<CardGroup cols={2}>
  <Card title="Resrant Scripts Discord" icon="discord" href="https://discord.com/invite/crwCA7jc2C">
    Join our official Discord server. This is the primary way to receive direct
    support, report bugs, and engage with the community.
  </Card>

  <Card title="Check Consoles for Errors" icon="terminal">
    Before asking for support, please gather any relevant error messages from: -
    Your **F8 client console** (press F8 in-game). - Your **server console**.
    Providing these errors helps us diagnose the issue much faster.
  </Card>

  <Card title="Verify Dependencies" icon="shield-exclamation">
    Double-check that all required dependencies (ESX, esx\_skin, skinchanger, and
    any others mentioned by the script) are installed, up-to-date, and working
    correctly.
  </Card>

  <Card title="Review `config.lua` Carefully" icon="file-cog">
    Many issues stem from simple syntax errors (like missing commas) or
    misconfigured options in `config.lua`. Review it carefully, perhaps using a
    Lua validator.
  </Card>
</CardGroup>

## Additional Resources

These resources can be helpful for general FiveM development and understanding how ESX and related systems work:

<CardGroup cols={3}>
  <Card title="ESX Documentation" icon="book-open" href="https://documentation.esx-framework.org/">
    Official documentation for the ESX Framework.
  </Card>

  <Card title="FiveM Server Setup Guide" icon="server" href="https://docs.fivem.net/docs/server-manual/setting-up-a-server/">
    A comprehensive guide to setting up and maintaining a FiveM server.
  </Card>

  <Card title="FiveM Native Reference" icon="code" href="https://docs.fivem.net/natives/">
    Documentation for FiveM native functions, useful for understanding game
    mechanics and scripting.
  </Card>
</CardGroup>

{" "}
