Skip to content

Exports and events ​

Server exports are trusted resource APIs. Never forward arbitrary client input into them.

Export Result / purpose
flag(src, detectorId, details) Submit a detection for a registered detector
getTrust(src, opts?) Trust score; {explain=true} additionally returns parts and breakdown
isFlagged(src) Boolean and an open case id when flagged
exempt(src, detectorId, ms, reason) Bounded exemption
expectTeleport(src, coordsOrOptions, ttl) Accepted destination allowance
expectEntity(src, modelOrOptions, ttl) Pre-creation model/count allowance
expectServerEntity(entity, reason) Mark authoritative server entity provenance
expectMoney(src, amount, reason, ttl, account) Successful direct credit receipt; exact account/reason/amount
expectHeal(src, details, ttl) Accepted health change receipt
getCase(id), getCases(filter) Case records
cameraReceipt(src, ms) Bounded camera activity receipt
setLegitState(src, state, enabled, ms) Broad temporary detector exemption; use carefully

The addon-host API also exposes registerDetector(def), addHook('beforeAction', fn) and removeHook(id). Registrations are owner-tracked and removed when the invoking addon stops. A beforeAction hook may return false, reason to veto an action.

Local server events (not client net APIs):

lua
AddEventHandler('np_anticheat:detection', function(detection) end)
AddEventHandler('np_anticheat:case', function(case, change) end)
AddEventHandler('np_anticheat:action', function(actionRecord) end)

Staff UI RPCs run through np_admin's page pipeline with duty, permission, rate and payload gates. Read RPCs are anticheat.overview.get, anticheat.cases.get, anticheat.events.get, anticheat.entities.get, anticheat.combat.get, anticheat.identity.get, anticheat.economy.get and anticheat.detectors.get. Write RPCs are operation-specific and server-authorized; the frontend cannot grant itself access.

Event configuration applies only to the current guard instance. Register and enforce authoritative handlers in the resource that owns them; the dashboard cannot retrofit hardening into arbitrary third-party handlers.