> ## 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 FFA 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: `insert.sql` not importing or errors related to FFA tables.">
    * **Solution**: Ensure the SQL file (`insert.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_ffa` (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) 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 all required ESX dependencies are installed,
      up-to-date, and functioning correctly.
  </Accordion>

  <Accordion title="Players Not Spawning in FFA Zone / Spawn Issues">
    * **Solution**: - Check the spawn coordinates in `Config.SpawnPoints` within
      `config.lua` to ensure they are valid and accessible. - Verify that the
      spawn points are not inside walls, underground, or in unreachable locations.
    * If using custom spawn logic, ensure the spawning functions are working
      correctly and not conflicting with other scripts.
  </Accordion>

  <Accordion title="Weapons Not Working / Missing Weapons in FFA">
    * **Solution**: - Double-check your `Config.Weapons` in `config.lua` for
      correct weapon hashes and configurations. - Ensure that weapon spawn
      settings are properly configured and that players have the necessary
      permissions. - Verify that weapon restrictions or allowlists are not
      preventing weapons from being given to players in the FFA zone.
  </Accordion>

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

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

  <Accordion title="Score/Kill Tracking Not Working">
    * **Solution**: - Verify that the kill tracking functions are properly
      configured in the script. - Check database permissions and ensure the
      score/statistics tables are correctly set up. - Look for any errors in the
      server console related to database queries or player statistics. - Ensure
      that the script has proper event handlers for player deaths and kills.
  </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>

{" "}
