Nova Defender
  • Lua API (DEPRECATED!)
    • Security
    • Networking
    • Base
    • Language
    • Notify
    • Ban System
    • Payloads
    • Logging
    • Settings
    • SQL
    • Detections
    • Misc
  • Console Commands
  • Troubleshooting
  • Language Template
Powered by GitBook
On this page
  1. Lua API (DEPRECATED!)

Detections

Detections are collected for each player

PreviousSQLNextMisc

Last updated 2 years ago

CtrlK
  • Hooks
  • Functions

Each detection has a predefined identifier. Unknown identifiers will be ignored. admin_manual will always get accepted.

Hooks

swatch_config_detection

Arguments

  1. (String) steamID32

  2. (Player) ply

  3. (String) detectionIdentifier

Functions

sWatch.checkDetection

Returns if this detection can be triggered by a specific player. This prevents a detection occuring multiple times for one player and enables you to temporary ignore a detection. This is already done inside and .

Arguments

  1. (Player|SteamID32|SteamID64) player

  2. (String) detectionIdentifier

Returns

  1. (Boolean) allowed - false if detection should not be handeled, true otherwise

sWatch.addDetection

Adds a detection for a player. Detections will display within the admin menus 'Players Online' tab. Will run hook swatch_config_detection

Arguments

  1. (Player|SteamID32|SteamID64) player

  2. (String) detectionIdentifier

  3. (String) description (optional)

sWatch.getPlayerDetections

Arguments

  1. (Player|SteamID32|SteamID64) player

Returns

  1. (Table) detections - {} if no detections found

  2. (Table) detectionDescriptions - contains identifier, description and time of detection. Will persist even after .

  3. (Number) detectionCount

sWatch.clearDetections

Arguments

  1. (Player|SteamID32|SteamID64) player

sWatch.clearDetections
sWatch.kickPlayer
sWatch.banPlayer