# FiveM Escrow System

### Differences between escrowed and open-source script

{% tabs %}
{% tab title="Escrowed script" %}

1. Scripts are encrypted with the FiveM Asset Escrow system.
2. Partially available code.
3. You can access everything except server.lua and client.lua.
4. If you wish to add support for custom scripts or frameworks, you can do so in the customizable bridge files.
   {% endtab %}

{% tab title="Open-Source script" %}

1. Every part of the script code is accessible.
2. More customization options.
   {% endtab %}
   {% endtabs %}

{% hint style="info" %}
For more information, visit this [link](https://forum.cfx.re/t/introducing-asset-escrow-for-your-resources/4777151)
{% endhint %}

***

### Common errors

<details>

<summary>You lack the required entitlement</summary>

**Information about the error:** This error occurs when there's an issue with the server key or the account used to purchase or activate a resource.

\
**Error fix:**

1. **Verify Server Key:** Ensure your server is using the correct server key linked to the FiveM account that purchased the resource. The server key must match the account that owns the resource.
2. **Check Account Ownership:** Make sure the FiveM account logged into [Portal](https://portal.cfx.re/login) owns the resource. If it's not visible, it may have been purchased with a different account or transferred.
3. **Server Key Management:** If the server key isn't generated by your account, either create a new key or transfer the resource to the account holding the key. <mark style="color:red;">Note that escrowed resources can only be transferred once.</mark>
4. **Restart Server:** A server restart can often resolve the issue.

</details>

<details>

<summary>Failed to verify protected resource</summary>

**Information about the error:** Script files were possibly corrupted during transfer. \
\
**Error fix:**

1. **Check for the .fxap File**: Ensure that the `.fxap` file is present in the script folder. This file can sometimes be skipped during transfer.
2. **FTP transferring problems**: FileZilla is known to cause issues with encrypted files, so double-check for missing files.
3. **Restart server:**  A server restart can often resolve the issue.

</details>

<details>

<summary>Error parsing script / Failed to load script</summary>

**Information about the error:** Your server artifacts are likely outdated.

**Error fix:**

1. Update your server to version **5181** or above.
2. Some files are corrupted or missing. Try re-uploading the script with another FTP.

</details>


---

# 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://docs.bkscripts.com/fivem-escrow-system.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.
