# Anti dumper

{% hint style="info" %}
**Anti dump protection is a standalone resource that prevent players to dump your client files in case you do not want to use escrow system provided by FiveM. This feature is collected from Reason Anticheat and can be used separately in case you need only this feature.**
{% endhint %}

{% hint style="info" %}
This resource uses Asset Escrow System provided by FiveM.
{% endhint %}

### Description

{% code overflow="wrap" %}

```
Anti dump protection feature will prevent players to dump your client files. This script can be used in case you do not want to escrow your resource on keymaster and keep your resource open source in server. If a player dumps your resource or server he will not get banned, but he will not receive the client files if the resource is secured. We encourage you to use escrow system, but in case you do not want to use it, you can use this resource in order to prevent dumping your client file.
```

{% endcode %}

### Usage

{% code overflow="wrap" %}

```
In order to make the script working, it requires manually implementation following the next steps:
```

{% endcode %}

* Turn off your server
* Add antidump resource to your server resources
* Add the following lines in the fxmanifest of the resource you want to secure

```lua
lua54 "on"
server_script "@antidump/source/server/server.lua"
client_script "@antidump/source/client/client.lua"
```

* Create a backup folder inside the resource you want to secure

<figure><img src="https://481932199-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F55CRzVaNZ2nH322f27RS%2Fuploads%2FC2xryKrZsUpV3iIXoluv%2Fbefore%20m.png?alt=media&#x26;token=8a1462fa-fa2b-419b-b64d-26aff93c0765" alt=""><figcaption><p>Resource testresource before implementing the script functionality</p></figcaption></figure>

<figure><img src="https://481932199-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F55CRzVaNZ2nH322f27RS%2Fuploads%2FQSwmjhEbXAbgD9rPHWkf%2Faftyer.png?alt=media&#x26;token=6a942d83-d904-4e88-b529-4fc94c3527a7" alt=""><figcaption><p>Resource testresource after adding backup folder</p></figcaption></figure>

* Move the client files from the resource you want to secure inside the backup folder
* Create an index.json file and add your client scripts from backup folder in the list (an example of index.json file exists in the antidump resource in list folder so you can copy it to the resource you want to secure)

<figure><img src="https://481932199-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F55CRzVaNZ2nH322f27RS%2Fuploads%2FT69AwhVIRy5iJNOa5W0n%2Fafter%20m.png?alt=media&#x26;token=57821978-b212-4014-bd85-c95ba9b8c6b7" alt=""><figcaption><p>Resource testresource after placing client files and index.json list of the client files that need to be secured</p></figcaption></figure>

```json
[
    "c_testresource.lua"
]
```

{% hint style="info" %}
The index.json file inside the backup folder of the resource contains the client file c\_testresource.lua as shown above. In case there are more client files, the list has to respect the json syntax.
{% endhint %}

Example 1

```json
[
    "c_testresource1.lua",
    "c_testresource2.lua"
]
```

```json
[
    "c_testresource1.lua",
    "c_testresource2.lua",
    "c_testresource3.lua"
]
```

{% hint style="warning" %}
Make sure that you started the antidump resource as first resource in server.cfg, above your resource list.
{% endhint %}

{% hint style="warning" %}
Do not change the name of folder backup. Keep it named backup. In case you rename it, the resource will not work.
{% endhint %}

{% hint style="danger" %}
Even though the fxmanifest of your resource does not contain the client files from backup folder you do not have to add them. This is how this feature works, so do not change anything in fxmanifest beside adding the shared lines of the antidump resource.
{% endhint %}

### Showcase

<figure><img src="https://481932199-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F55CRzVaNZ2nH322f27RS%2Fuploads%2FJTwYnspnf8sv2N5VZJqd%2Fimage%20edit%203.png?alt=media&#x26;token=6632138a-1ba7-4ed0-9758-d04f49ab5c75" alt=""><figcaption><p>Dumper cannot see the client file because it is in the backup folder, not as it is declared in lines 10 to 12 in fxmanifest. Client file is still working even through it is not declared in fxmanifest with the help of lines 2 to 3 which have been added when the command was executed</p></figcaption></figure>
