Berkan Kılıç

Docs

FiveM & RedM Event Logger & Optimization Documentation

FiveM & RedM Event Logger & Optimization →

Installation

  1. In your own server's artifacts folder, replace scheduler.lua with the one included at artifacts/scheduler.lua (overwrite it). Event logging depends entirely on this.
  2. Copy this resource folder into your server's resources folder and add the following lines to your server.cfg — ideally as close to the top as possible, so it's one of the first resources to start.
⚠️ Heads up: if you skip replacing scheduler.lua, event logging won't work at all — silently, with no error.
ensure sz-debugger
add_ace resource.sz-debugger command.restart allow

Then:

  1. Add your own steam/license/discord identifier to the szmenu_allowed list in config.json — otherwise nobody except the console (source 0) can open /szmenu.
  2. Start your server and verify the interface opens by typing /szmenu in-game.
  3. Adjust the settings in config.json as needed.
⚠️ Heads up: after editing config.json, run /szrefresh in the server console — changes are not loaded automatically.

Installation Checklist:

  • Added your own identifier to szmenu_allowed?
  • Replaced artifacts/scheduler.lua?
  • (Recommended) ensure sz-debugger near the top of server.cfg?
  • Added add_ace resource.sz-debugger command.restart allow to server.cfg?
  • Verified /szstats and /szmenu work?

Configuration

Key settings in config.json (run /szrefresh after editing):

  • scriptEnabled — master kill switch; disabling stops all logging/detection/notification instantly without stopping the resource.
  • entityLogEnabled (off by default) — raw log for the Entity Log tab, keep off unless you need it for performance.
  • maxStateBagPayload / maxEventPayload — data larger than these sizes is flagged "Critical".
  • rateWindowMs / maxEventsPerWindow / maxSingleEventPerWindow — time window and thresholds for rate-limit detection.
  • logRetentionHours — how many hours before log files are deleted (doesn't affect counters, which are persistent).
  • config.features — toggle StateBag detection, rate-limit detection, shared-identity (alt-account) detection individually.
  • config.notifications — mass-drop and critical-spike thresholds/time windows, should match your server's size.
  • Lists — blocked_trigger/blocked_resources (cut off entirely), rate_limit_exempt (frequent but non-attack events), allowed_trigger/allowed_resources (if non-empty, only those are logged).

Exports

Almost all of the script's operations can be done from the console or in-game command line without opening /szmenu. Always authorized from the console (source 0); in-game requires being on the szmenu_allowed list.

  • /szmenu, /szrefresh, /szlogclear — menu and general management.
  • /szstats [ID], /szstatsreset, /szhealthcheck — counter/log commands.
  • /szblock <eventName>, /szallow <eventName>, /szrateexempt <eventName> — block/allow/exemption lists.
  • /sznotifications [count], /szshared, /szoptreport — notification and report commands.
  • /szfeature <name> [on/off], /szhiddentab <tabKey> [on/off] — instant setting/tab toggles.

Command names are fixed; enable/disable each individually under config.json > config.commands.

F.A.Q

  • If szmenu_allowed is empty, nobody except the console can open /szmenu.
  • After editing config.json, you need to run /szrefresh, changes are not loaded automatically.
  • On busy servers (500+ players), "Shared Players" detection is automatically capped (at most the 300 most-active IDs, refreshed every 15s).
  • All chart/counter/history data is persistent (logs/sz_state.json), it doesn't reset on a resource/server restart.
  • Language selection is personal (browser localStorage) — but live in-game notifications always go out in Turkish, broadcast from the server to every authorized player at once.
  • For naturally frequent events like entityCreating, add them to rate_limit_exempt or use /szrateexempt <eventName>.