Skip to main content
Guard is UgCore’s built-in watchdog. Every rejected request, every invalid payload and every check a resource fails adds to the player’s score. Scores decay over time. When a score crosses a threshold, Guard acts.

Violations and weights

Resources report their own checks with UgCore.Guard.Flag.

Thresholds

config/guard.lua
0 disables an action. Bans are off by default: turn them on once you trust your thresholds.

What players see

Nothing that helps them. Kicks show “You were disconnected from the server.” and bans “You are banned from this server.” The detail stays in your console:
Run ug guard <id> for the full picture:

The global budget

Each player gets one budget shared by every UgCore net event and callback, from every resource: 40 requests per second by default. Traffic past it is dropped before any handler runs, and flagged.

Plug in your anticheat

Every action goes through the Guard:BeforeAction hook first. An external anticheat can cancel it or pick a milder action, never a harsher one:
Guard watches UgCore traffic. Also lock down entity creation from clients with FXServer’s sv_entityLockdown convar. Check the Cfx documentation for the current values before setting it.