FairShield
On this page5
The FairShield lookup tells staff whether a player's Discord account is in known cheat servers. It
needs an API key from FairShield. The key is free, through our partnership with FairShield: ask
for it in the FairShieldAC Discord (opens in a new tab). Until you set one, the lookup is off. The settings
are in config_server.lua.
Switch it on
- Ask for your free API key in the FairShieldAC Discord (opens in a new tab). The panel has the same link: open the FairShield page and press Open FairShield Discord.
- Open
config_server.luaand findConfigServer.FairShield. - Set
Enabledtotrueand paste your key intoApiKey. Leave the other lines as they are. - Restart the resource.
- Open the panel, go to FairShield, and press Look up on an online player.
The two lines after the change:
lua
Enabled = true,
ApiKey = '[YOUR FAIRSHIELD API KEY]',The keys
| Key | Default | Allowed | What it does |
|---|---|---|---|
Enabled | false | true / false | The switch of the lookup. The lookup works only with Enabled = true and a key in ApiKey. |
ApiKey | '' | The key FairShield gave you | Proves to FairShield that the request comes from your server. It is used on the server only and is never sent to a player's game. |
BaseUrl | Already filled in | Leave it as it is | The address of the FairShield service. |
CacheTtl | 300 | Seconds · 0 = never keep | How long the answer for one Discord account is kept. A second lookup of the same account in that time shows the kept answer and does not ask FairShield again. |
DiscordInvite | Already filled in | A full https:// link | The link behind Open FairShield Discord in the notice staff see while the lookup is off. |
- The kept answers are gone after a restart of the resource.
- The panel sends FairShield the Discord ID of the player, nothing else about them.
While it is not configured
Nothing is sent to FairShield. Staff with the FairShield lookup permission see this:
| Where | What staff see |
|---|---|
| The FairShield page | A notice Lookup not configured: "Get an API key in the FairShield Discord and add it to config_server.lua to turn the lookup on." Under it is the link Open FairShield Discord. |
| A player's profile, button Look up on FairShield | A card Not configured: "FairShield lookup is not configured. Ask the server owner for an API key in the FairShield Discord." |
Who can use it
| Permission | Key | Needed for |
|---|---|---|
| FairShield lookup | fairshield.lookup | The FairShield page and the Look up on FairShield button on a profile |
| Offline players | player.offline | A lookup from the profile of a player who is offline |
- The default ranks God, Admin and Moderator have FairShield lookup. See Super-Admin & Ranks.
- Every lookup that goes to FairShield is written to the log with the tag
/lookup. - The lookup works by Discord account. A player with no Discord linked to FiveM cannot be checked. Their row shows No Discord.
Problems
| What staff read | In the server console | Why | Fix |
|---|---|---|---|
| "FairShield did not accept the API key. Tell the server owner." | [5code-adminpanel] FairShield did not accept the API key (HTTP 401). Check ConfigServer.FairShield.ApiKey in config_server.lua. | The key is wrong or no longer valid. | Paste the key again, without spaces. If it still fails, ask for a new key in the FairShield Discord. |
| "FairShield refused the request. Tell the server owner." | [5code-adminpanel] FairShield refused the lookup request (HTTP 403). | FairShield does not allow this request. | Ask in the FairShield Discord. |
| "Too many FairShield lookups right now. Wait a moment and try again." | Many lookups were sent in a short time. | Wait a moment and press Look up again. | |
| "FairShield lookup failed. Try again later." | FairShield did not answer, or the answer could not be read. | Try again later. Check that BaseUrl is unchanged. | |
| "This player has no Discord linked, so FairShield cannot check them." | The player has no Discord linked to FiveM. | Nothing to set. The player links Discord to FiveM. |
Related: FairShield Lookup · Discord Webhooks · Troubleshooting.