Reason AnticheatDocs

Bans

Local bans

Info

All your local bans, which means the bans given on your server will be saved in resource rac -> banData -> bans.json.

In case you want to unban someone there are more ways to remove him from the anticheat ban list:

a. Unban from in game menu

  1. To unban a specific player from anticheat ban list, you can use in game menu Unban player from Bans options (Recommended)
  2. To unban all players from anticheat ban list, you can use in game menu Unban all from Self options, in the left side of the in game menu

b. Unban from server console

  1. To unban a specific player from anticheat ban list, you can type in server console racunban <id>. Check Commands section for more information about racunban <id> command
  2. To unban all players from anticheat ban list, you can type in server console racunbanall. Check Commands section for more information about racunbanall command

c. Unban from bans.json file (Use this method only in case you know what are you doing because you have to keep the json format without errors)

  1. Delete the ban from bans.json for the player you want to unban
  2. Delete all bans and keep only the brackets from initial file
Warning

In case you cause errors because of json format from bans.json the connection to server will not work anymore (it will show rac: Deferring connection..), so players cannot connect anymore and errors on server console. It is recommended to use an extension on your editing software or run a compiler to check the error in case you have this issue.

Warning

In case you delete the entire file without having the brackets from initial file the connection to server will not work anymore (it will show rac: Deferring connection..) and errors on server console, so players cannot connect anymore. To fix the issue, add the brackets as in the initial file was or replace the bans.json with the initial one.

This is how bans.json file looks without any ban:

[]

or

[
]

Can I use the ban system on my server?

Yes, you can use the ban system on your server too by using following exports:

exports['racv2']:racBanDiscordLog(source, reason) -- if you also want to discord log
exports['racv2']:AddPlayerToBanList(source, reason)

where, source is the player source and instead of reason you can add your text reason. The discord log will be sent to the ban webhook set in webhooks file of anticheat resource and the bans will be added to the bans.json file of anticheat resource

Example of usage (1)

exports['racv2']:racBanDiscordLog(source, "Cheating and trolling")
exports['racv2']:AddPlayerToBanList(source, "Cheating and trolling")

Example of usage (2)

local reason = "Cheating and trolling"
exports['racv2']:racBanDiscordLog(source, reason)
exports['racv2']:AddPlayerToBanList(source, reason)
Warning

In the documentation we have used exports['racv2'], but in case you use the legacy version you have to use exports['rac']. This feature is available also in legacy version