# Commands

## Commands list

```
• Version
• Scanner
• Scan and delete malware
• Refresh config
• Help
• Clear everything
• Clear vehicles
• Clear peds
• Clear objects
• Bans
• Unban
• Unban all
• Blacklist
• Move ban to blacklist
• Unblacklist
• Unblacklist all
• Install anti lua inject
• Uninstall anti lua inject
```

## Commands usage

### Help

Command rachelp in server console will show you all the available commands:

```
racversion - The anticheat version that you are running on your server
racscan - Scan your server for backdoors
racdeletemalware - Scan your server for malware and neutralize all infected resources
racrefreshconfig - Refresh your config file after updating fields from config file
racclearall - Clear vehicles, peds, objects
racclearvehicles - Clear vehicles
racclearpeds - Clear peds
racclearobjects - Clear objects
racbans - Bans list
racunban <id> - Unban player from anticheat
racunbanall - Unban all players from anticheat
racblacklist - Blacklist
racmovetoblacklist <id> - Move ban id to blacklist
racunblacklist <id> - Unblacklist player from anticheat
racunblacklistall - Unblacklist all players from anticheat
```

### Version

{% code overflow="wrap" %}

```
Command racversion in server console will show the anticheat version that you are running on your server.
```

{% endcode %}

### Scanner

{% code overflow="wrap" %}

```
Command racscan in server console will print backdoors such as hidden / obfuscated commands or cipher or malware content from your server files which were found in your server resources that can have a risk or even high risk to your server. If a backdoor has been found, you can contact support to give you more information about the found backdoor by inspecting found code.
```

{% endcode %}

### Delete malware

{% code overflow="wrap" %}

```
Command racdeletemalware in server console will neutralize malware content from your server files which were found in your server resources that can have a very high risk to your server. If a backdoor has been found, you can contact support to give you more information about the found backdoor by inspecting found code.
```

{% endcode %}

{% hint style="info" %}
Use this command only if needed (only if the anticheat resource has found a suspicious resource inside your artifacts or cipher raid your server), otherwise the command racscan and remove all backdoors found is enough
{% endhint %}

{% hint style="info" %}
In order to make the command fully work, you need to add in your server.cfg the following permission:
{% endhint %}

```bash
add_ace resource.rac command allow
```

{% hint style="danger" %}
Command racdeletemalware will delete webpack, yarn, screenshot-basic, oxmysql resources (maybe others) and you have to reinstall them from official sources

webpack: <https://github.com/citizenfx/cfx-server-data/tree/master/resources/%5Bsystem%5D/%5Bbuilders%5D>

yarn: <https://github.com/citizenfx/cfx-server-data/tree/master/resources/%5Bsystem%5D/%5Bbuilders%5D>

screenshot-basic: <https://github.com/citizenfx/screenshot-basic>

oxmysql: <https://github.com/overextended/oxmysql>

It is recommended to reinstall the ox\_lib and pma-voice resources

ox\_lib: <https://github.com/overextended/ox_lib/releases/latest/download/ox_lib.zip>

pma-voice: <https://github.com/AvarianKnight/pma-voice>
{% endhint %}

{% hint style="danger" %}
Make sure the anticheat resource has not been infected by checking if there is any new folder or file that should not be there
{% endhint %}

{% code overflow="wrap" %}

```
Steps to clean your server
1. Backup your server
2. Use command racscan (while server is running)
3. Use command racdeletemalware (while server is running)
4. Note all your resources that have been cleaned in order to check them later if any file is missing
5. Use command racscan to check the remaining backdoors inside your server
6. Remove the remaining backdoors inside your server
7. Reinstall webpack, yarn, screenshot-basic, oxmysql
8. Reinstall ox_lib, pma-voice (only if needed, but recommended)
9. Make sure the anticheat resource has not been infected by checking if there is any new folder or file that should not be there
10. Stop your server console / FXServer
11. Start your server console / FXServer
12. Use command racscan -> make sure there are no backdoors left
13. Restart your server (1)
14. Use command racscan -> make sure there are no backdoors left
15. Restart your server (2)
16. Use command racscan -> make sure there are no backdoors left
```

{% endcode %}

{% hint style="info" %}
If there are no backdoors left after two restarts, your server is safe. From now, whenever you add a resource, either from backup, either shared resources, analyse them manually by checking if they contain any harmful content
{% endhint %}

{% hint style="info" %}
In windows, some malware files are hidden, so in order to see them you have to enable the hidden files
{% endhint %}

<figure><img src="/files/kgC3XYs7ub1qg5PYhdON" alt=""><figcaption></figcaption></figure>

### Refresh config

{% code overflow="wrap" %}

```
Command racrefreshconfig in server console will refresh your config file after updating fields from config file without restarting/ensuring the anticheat resource.
```

{% endcode %}

{% hint style="info" %}
We recommend to use racrefreshconfig in the console to apply changes to your config file instead of restarting/ensuring the anticheat resource. Avoid restarting the resource while players are online, as the live map feature causes long load times and cache saving delays due to large amount of files.
{% endhint %}

### Clear Everything

{% code overflow="wrap" %}

```
Command racclearall in server console will delete every unused vehicles, peds and objects on the server. You can change this command from config file (Config.ClearAllCommand).
```

{% endcode %}

### Clear vehicles

{% code overflow="wrap" %}

```
Command racclearvehicles in server console will delete every unused vehicles on the server. You can change this command from config file (Config.ClearVehiclesCommand).
```

{% endcode %}

### Clear ped

{% code overflow="wrap" %}

```
Command racclearpeds in server console will delete every ped on the server. You can change this command from config file (Config.ClearPedsCommand).
```

{% endcode %}

### Clear objects

{% code overflow="wrap" %}

```
Command racclearobjects in server console will delete every object / prop on the server. You can change this command from config file (Config.ClearObjectsCommand).
```

{% endcode %}

### Ban list

{% code overflow="wrap" %}

```
Command racbans in server console will print on server console all bans from bans.json file. The result will show the Id, Player name, Reason and Date. You can change this command from config file (Config.BanListCommand)
```

{% endcode %}

<figure><img src="/files/0r7YTGJUy3Pf6mDPOK1a" alt=""><figcaption><p>Example of ban list result</p></figcaption></figure>

### Unban player from server console

{% code overflow="wrap" %}

```
Command racunban <id> in server console will remove (unban) the player with the entered id from the anticheat ban list. Before enter the Id to unban the player, you have to use the Ban list command (Config.BanListCommand) in order to get the Id you want to remove (unban) or check the bans.json file and get the "id". You can change the unban player command from config file (Config.UnbanCommand).
```

{% endcode %}

{% hint style="warning" %}
The Id you enter is not the player id from your server, the Id is the number of ban got in the ban list. You have to get the Id by typing Ban list command (Config.BanListCommand) in server console and it will provide as first element for each ban or get it from bans.json file, the field "id"
{% endhint %}

{% code overflow="wrap" %}

```
As an example for the above ban list, if we want to remove the player with Id 3, we have to type racunban 3
```

{% endcode %}

<figure><img src="/files/0Jv13NknZYetZyYxwEsa" alt=""><figcaption><p>Example of unban player</p></figcaption></figure>

{% hint style="info" %}
By unbanning a player from server console with Config.UnbanCommand, the file bans.json will also get updated.
{% endhint %}

### Unban all players from server console

{% code overflow="wrap" %}

```
Command racunbanall will remove (unban) all players from the anticheat ban list. You can change this command from config file (Config.UnbanAllCommand)
```

{% endcode %}

{% hint style="info" %}
By unbanning all players from server console using Config.UnbanAllCommand, the file bans.json will also get updated.
{% endhint %}

### Blacklist

{% code overflow="wrap" %}

```
Command racblacklist in server console will print on server console all blacklists from blacklist.json file. You can change this command from config file (Config.BlacklistCommand)
```

{% endcode %}

### Move ban to blacklist

{% code overflow="wrap" %}

```
Command racmovetoblacklist <id> in server console will move the ban id from bans list (bans.json file) to blacklist (blacklist.json). Before enter the Id to move the ban of the player to blacklist, you have to use the Ban list command (Config.BanListCommand) in order to get the Id of the player you want to move from bans list to blacklist. You can change the move ban id to blacklist command from config file (Config.MoveToBlacklistCommand).
```

{% endcode %}

{% hint style="warning" %}
The Id you enter is not the player id from your server, the Id is the number of ban got in the ban list. You have to get the Id by typing Ban list command (Config.BanListCommand) in server console and it will provide as first element for each ban or get it from bans.json file, the field "id"
{% endhint %}

{% hint style="info" %}
By moving a player ban to blacklist from server console using Config.MoveToBlacklistCommand, the file bans.json and blacklist.json will also get updated.
{% endhint %}

### Unblacklist player from server console

{% code overflow="wrap" %}

```
Command racunblacklist <id> in server console will remove (unblacklist) the player with the entered id from the anticheat blacklist. Before enter the Id to unblacklist the player, you have to use the Blacklist command (Config.BlacklistCommand) in order to get the Id you want to remove (unblacklist) or check the blacklist.json file and get the "id". You can change the unblacklist player command from config file (Config.UnblacklistCommand).
```

{% endcode %}

{% hint style="warning" %}
The Id you enter is not the player id from your server, the Id is the number of blacklist got in the blacklist. You have to get the Id by typing Blacklist command (Config.BlacklistCommand) in server console and it will provide as first element for each ban or get it from blacklist.json file, the field "id"
{% endhint %}

{% hint style="info" %}
By unblacklisting a player from server console with Config.UnblacklistCommand, the file blacklist.json will also get updated.
{% endhint %}

### Unblacklist all players from server console

{% code overflow="wrap" %}

```
Command racunblacklistall will remove (unblacklist) all players from the anticheat blacklist. You can change this command from config file (Config.UnblacklistAllCommand)
```

{% endcode %}

{% hint style="info" %}
By unblacklisting all players from server console using Config.UnblacklistAllCommand, the file blacklist.json will also get updated.
{% endhint %}

#### Anti lua inject

{% code overflow="wrap" %}

```
This feature will not allow cheaters to execute code that does not exist from executors only if it is captured in the monitored resources
```

{% endcode %}

{% code overflow="wrap" %}

```
In order to install the inject protection for your script, you have to add it manually. To add inject protection, set Config.AntiLuaInject to true and add in fxmanifest of the resource you want to monitor the following lines:
```

{% endcode %}

```lua
lua54 "yes"
client_script "@rac/source/client/inject.lua"
shared_scripts {"@ox_lib/init.lua"}
dependencies {"ox_lib"}
```

### Event Protection

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

{% code overflow="wrap" %}

```
This feature will not allow cheaters to call trigger events from executors only for the secured events. When a secured trigger is called for a player from scripts normally, there will not be any problem, but if the player tries to call the trigger from executor he will be detected and get him banned
```

{% endcode %}

{% hint style="info" %}
The event protection works on tokenizer principle, which means each protected event generates a token when a trigger server event is called from the server, and if the token does not match, the player will get banned
{% endhint %}

{% hint style="info" %}
In order to install the event protection for your script, you have to add it manually. To add event protection for specific events, you have to add the event you want to protect in config on SecuredServerEvents or  SecuredClientEvents and add in fxmanifest of the resource you want to protect (from where the trigger belongs to) the following lines:

```lua
lua54 "yes"
client_script "@rac/source/client/trigger.lua"
server_script "@rac/source/server/trigger.lua"
shared_scripts {"@ox_lib/init.lua"}
dependencies {"ox_lib"}
```

{% endhint %}

<figure><img src="/files/Z3MJijx2murLvBNHR8ji" alt=""><figcaption><p>After restart server, the events from resource testresource have been protected</p></figcaption></figure>

```
Showcase available on Anti trigger event protection category
```

### Dump protection

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

{% code overflow="wrap" %}

```
This feature will not allow cheaters to dump the client and NUI files only for secured resources. When a cheater will dump the resource, the client and NUI files will not be received.
```

{% endcode %}

{% hint style="warning" %}
Make sure to create a backup of your resource before you secure your resource from dump.
{% endhint %}

{% code overflow="wrap" %}

```
In order to make the dump protection working, it requires manually implementation by following the next steps:
1. Turn off your server
2. Add the following lines in the fxmanifest of the resource you want to secure
```

{% endcode %}

```lua
lua54 "yes"
server_script "@rac/source/server/dump.lua"
client_script "@rac/source/client/dump.lua"
files {'html/index.html'}
ui_page 'html/index.html'
```

```
3. Create a backup folder inside the resource you want to secure
```

<figure><img src="/files/61JPzkwKHgXRfDj2qQKj" alt=""><figcaption><p>Resource testresource before implementing the dump protection</p></figcaption></figure>

<figure><img src="/files/oRC0Wo90Peo31Wu2LAVu" alt=""><figcaption><p>Resource testresource after adding backup folder</p></figcaption></figure>

{% code overflow="wrap" %}

```
4. Move the client and NUI files from the resource you want to secure inside the backup folder
5. Add the index.json file from assets archive (.rar) from the anticheat resource (rac > assets.rar > backup) in the backup folder of the resource you want to secure
6. Add the index.html file from assets archive (.rar) from the anticheat resource (rac > assets.rar > html) in the html folder of the resource you want to secure
```

{% endcode %}

<figure><img src="/files/GflswE2SF3xY5beXlbKf" alt=""><figcaption><p>Resource testresource after placing client, NUI files, index.json list of client and NUI files, and index.html file that need to be secured</p></figcaption></figure>

{% code overflow="wrap" %}

```
The index.json file inside the backup folder of the resource that you want to secure contains the name of client and NUI files (example shown above: client file c_testresource.lua and NUI files index.html, style.css, script.js). In case there are more client or NUI files, the list can continue with the name of all files, but the list has to respect the json syntax
```

{% endcode %}

```json
[
  "c_testresource.lua",
  "index.html",
  "style.css",
  "script.js"
]
```

{% hint style="danger" %}
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 and NUI 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 from above on point (2).
{% endhint %}

```
Showcase available on Anti dumper category
```


---

# 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.reasonanticheat.net/resources-documentation/reason-anticheat/commands.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.
