LAUNCH OFFER Monthly plan at €29.99/month — rises to €39.99 at Christmas See pricing →
05Documentation

Safe Events

A session token on every event of your resources, without touching their code.

#What it is

With the guard installed in a resource, every TriggerServerEvent of that resource carries a session token. An executor or menu firing the event from outside the script has no token and gets blocked. The guard also rate-limits events, rejects invalid arguments and protects exports.

Note

The token secret is not in the code: the server creates a new key for every player in every session.

#Install the guard in every resource

FXServer doesn't let a resource write into others, so the guard is installed with the server stopped, using the installer shipped with BlackShield:

  • Windows: blackshield/tools/instalar-guard.bat (double click)
  • Linux: sh blackshield/tools/instalar-guard.sh

Choose 1) Install. It adds one line to each resource's fxmanifest.lua and keeps a copy of the original (fxmanifest.lua.drsbak):

fxmanifest.lua
shared_script '@blackshield/lib/shared.lua' -- core lib

2) Remove restores everything. If the folder has another name, the line uses that name (see Resource name); lines from older versions (@blackshield/guard/…) are replaced automatically. Then start the server and check in the console:

text
acguard status

#Modes

Start in learn for a few days, then switch to enforce:

text
acsafe list              # events that arrived without a token
acsafe exempt learned    # learned events become exceptions
acsafe mode enforce      # block and detect
ModeWhat it does
learnOnly logs events without a token
enforceBlocks and detects ("Event without token")
offDisabled

#Honeypots

BlackShield registers honeypot events with names menus usually fire. A honeypot is only mounted if its owning resource doesn't exist and no resource on your server uses that event — it never catches a legitimate event.

Need help?

Something unclear? Open a ticket.

New ticket