Protection Rules
Finding a rule, turning it on, choosing kick or ban, the per-rule options behind each card, and what a reset and a save actually do.
Protection Rules is where every detection is switched on or off and told what to do when it fires. What each individual detection looks for is listed in the Detections reference. This page covers the controls around them: the toolbar, the card, the shapes an option can take, and what happens when you save.
Finding a rule
Rules are grouped into category tabs and one category is shown at a time. The toolbar above the tabs is what you use when you do not know which tab a rule lives in.
| Control | Options | What it does |
|---|---|---|
| Search | Free text | Spans every category at once and replaces the tab view while it has anything in it, so you never need to know where a rule lives. |
| Filter | All, On, Off | Filtering to Off is the quickest way to see what you are not running. |
| Sort | Enabled first, Disabled first, Name A-Z, Name Z-A | Applies inside whichever category or search result is on screen. |
The category tabs
On resource 1.5.9.4 and newer the detections are grouped, and the tab you are on is also the middle segment of every config path inside it. Older servers keep a flat config and everything lands under one tab.
| Tab | Config path |
|---|---|
| Main | Detections.Main |
| Player Stats | Detections.Playerstats |
| Resources | Detections.Resources |
| Entities | Detections.Entities |
| Events | Detections.Events |
| Weapons | Detections.Weapons |
| Pyrotechnics | Detections.Pyrotechnics |
A rule card
Each card carries the rule name, an information button, and on the right:
- The action pill, showing
kickorban. Click it to switch. It only appears while the rule is enabled, and only on rules that have an action at all. - The master toggle for the rule.
The information button opens a plain-English description of what the rule catches. Read it before switching a rule to ban, because the cost of a false positive on a ban is a great deal higher than on a kick.
Per-rule options
Everything a rule carries beyond its enable and action is shown inline on the card, so there is no hidden second screen. Five shapes cover all of it.
| Shape | Typical key | What it is for |
|---|---|---|
| Sub-detection toggles | Types | A rule can watch for several different behaviours and each one switches on its own, so one noisy sub-check can be turned off without losing the rest. |
| Numbers | Threshold, TimeWindow, Maximum | Raising a threshold makes the rule fire later and less often. The standard way to quiet a rule that is catching legitimate activity, and the bluntest, because it weakens the rule for everybody. |
| Whitelist lists | WhitelistResources, WhitelistEvents, WhitelistModels, WhitelistWeapons | Adding an entry lets exactly that thing pass without tripping the rule. Far more surgical than a threshold change, and where a false positive from one of your own scripts almost always belongs. |
| Whitelist zones | WhitelistZones | Spheres of the map the rule ignores, each stored as X, Y, Z and a radius that defaults to 30. Twenty-one detections carry one: the player-stat checks, the vehicle-tampering checks and AntiNoRecoil. |
| Spam rules | Rules | Numbered counting rules, covered below. On the entity, damage and pyrotechnic spam protections. |
Spam rules
A spam protection does not have one threshold, it has up to five numbered rules, each with its own type, threshold and time window. They ship from resource 1.7.2 and newer; an older build ignores a Rules map entirely.
| Detection | Where the map sits | Rule types |
|---|---|---|
EntitiesSpamProtection | Types.<Peds|Vehicles|Objects>.Rules | normal, deleted, nearplayer and stacked on every type, plus launched on Vehicles alone and hidden on Peds alone from 1.8.8. The vocabulary changed at 1.8.1, so the type selector offers only what your build understands. |
AntiSpamDamage | Rules | normal and victims, plus kills from 1.8.9. This is the one family whose rules stamp Threshold and Time Window onto the detection, so the log says what the rule was armed with. |
AntiExplosionAi, AntiParticleAi, AntiProjectileAi | Types.Spam.Rules | normal, cluster and spread. |
Rules are always numbered from one with no gaps, because the number is a position rather than an identity. Deleting rule four of five renumbers rule five down to four, and deleting the last rule leaves nothing to count with, so the node above the map is switched off with it. On the three detections whose map sits under a type that means the type goes off; on AntiSpamDamage, whose map sits on the detection itself, it means the whole detection does. A rule whose type your build does not recognise is not drawn, but it keeps its slot in the numbering and in the cap, so nothing you tuned on an older build is lost.
The one thing the editor will not let you do
A rule built out of a Types block cannot be enabled while every type inside it is off. The toggle refuses and tells you to enable a type first. That is not a limitation, it is stopping a rule that would sit there looking enabled and catching nothing. For the same reason, flipping such a rule on changes nothing the save bar considers dirty until you turn a type on as well.
Reset to default
The header button loads the recommended configuration for your resource version. Three things about it are worth knowing before you press it.
- It replaces your detection settings with ours, including every whitelist you have built up, so treat it as a fresh start rather than a repair.
- It is not scoped to this page. The whole configuration is replaced, so your Main Settings go back to defaults too. The Discord webhooks are carried over, because those are your own wiring rather than a factory setting, and the global-ban switch and its whitelist are untouched because they live outside the config.
- Like everything else on the page it is only an edit until you press Save Changes, and Reset on the save bar puts your settings back.
The button is only shown to someone who can edit, and it needs a published default for your version to exist, so on a brand new version it may tell you there is none yet rather than loading one.
Saving and permissions
- Nothing writes as you toggle. The Save Changes bar at the bottom does the writing.
- A save that touched the detections writes a protection rules row to the activity log with your name on it. A save that touched anything else writes a config save row.
- The new configuration is pushed to a connected resource straight away, and an offline server picks it up when it reconnects. A save that only changed something the resource never receives is not pushed at all, so nothing reloads for a change it would never see.
- A save is a compare-and-swap against the version you loaded. If somebody else saved while you were editing, yours is refused rather than quietly overwriting theirs.
| Permission | What it allows |
|---|---|
settings:view | Reading the page. Every control is visible and disabled, which is intentional: an admin should be able to see how the server is configured before asking for a change. |
settings:edit | Changing anything, resetting to default, and saving. The server owner always has it. |