# Setup

**1. Download the Script:** Download the AceGuard and AceGuard security\_key files from Keymaster.

**2. Install Required Resources: Screenshot-Basic:**

* Make sure the "[screenshot-basic](https://github.com/citizenfx/screenshot-basic)" resource is added to your server resources. This is a prerequisite for the proper functioning of the script.

**3. Modify Server Configuration and Ensure AceGuard:**

* Upload the downloaded AceGuard resource files to your FiveM server's resources folder.
* Open your server's configuration file (usually "server.cfg") and add the following line to ensure the AceGuard resource: `ensure AceGuard`.
* **Important**: While ensuring the AceGuard resource, it is essential to retain the original names for both AceGuard and the security key (`z17hQ8Ez`). Do not rename the AceGuard resource or the security key.

**4. Restart the Server and Wait for Module Downloads:** Restart your FiveM server to initiate the script's installation. Allow some time for all necessary modules to be downloaded and integrated. This might take a few minutes, depending on your server's performance and internet speed.

**5. Second Server Restart After Module Downloads:** After the modules have been downloaded, restart your FiveM server once again. This step is crucial for the full integration of the script's features.

**6. Set Up ACE Permissions:** In your server's `server.cfg` file, add the following line to grant ACE permissions for the AceGuard resource:

```bash
add_ace resource.AceGuard command allow
```

**7. Configure Detection Settings:** Locate the configuration file associated with the script. Within this file, you'll find settings related to different detections. Adjust these settings to align with your server's requirements and desired level of protection.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ace-scripts.gitbook.io/aceguard/setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
