> For the complete documentation index, see [llms.txt](https://prisma-logs.gitbook.io/prisma-logs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://prisma-logs.gitbook.io/prisma-logs/docs/en/configuration/script-scan.md).

# Script scan

The script scan makes sure the actions of all your other scripts are logged too, without a single line of code.

## How it works

1. The resource reads the server files of every running script.
2. It looks for actions players can trigger: `RegisterNetEvent`, `RegisterServerEvent` and `onNet` for JavaScript.
3. The actions it finds go to the panel and are put in a category per **theme**.
4. From then on the resource listens along and logs every action with the player, their license and all data that was sent.

Your scripts are **never changed**. They are only read.

## Themes

Scripts are sorted into a theme by their name. The most specific word wins, so `qb-bankrobbery` goes to crime, not economy.

| Category           | Examples                                       |
| ------------------ | ---------------------------------------------- |
| police & crime     | policejob, prison, bankrobbery, drugs, weed    |
| job scripts        | ambulancejob, mechanicjob, taxijob, garbagejob |
| vehicle scripts    | garages, vehiclekeys, vehicleshop, fuel        |
| economy & shops    | shops, pawnshop, banking, crafting             |
| housing            | houses, apartments                             |
| phone & social     | phone, radio                                   |
| player & character | inventory, clothing, hud, multicharacter       |
| server & admin     | adminmenu, core, doorlock, anticheat           |
| other scripts      | everything that doesn't fit                    |

Every log has a `script` field. In the panel, click a script at the top to only see its logs.

## When it scans

* **Automatically** on the first start of your server.
* **Manually** in the panel: **Categories → Scan scripts**. Do this after adding new scripts. Your server picks it up within 30 seconds.

If your server doesn't answer within 2 minutes, the scan cancels itself and you see why.

## Turning actions on or off

Every script category has an **Actions** button. It shows all actions per script, with the event name and the file it was found in. Turn off actions that happen too often, or turn a whole script on or off with **All on / All off**. Your server applies it within 30 seconds.

## Spam protection

* Each action is logged at most `Shared.ScanMaxPerMinute` times per minute (default 30).
* Callbacks, heartbeats and events like `esx:updateCoords` are skipped by default. See [config.lua](/prisma-logs/docs/en/configuration/configuration.md#script-scan).

## What it can't do

* **Encrypted scripts** (Tebex escrow) can't be read. The console shows which ones. Log them with [your own events](/prisma-logs/docs/en/configuration/custom-events.md) if you know the event names.
* **Event names built in code**, like `GetCurrentResourceName()..':buy'`, are not found.
* **Callbacks** (`lib.callback`, `QBCore.Functions.CreateCallback`) are not events and are not logged.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://prisma-logs.gitbook.io/prisma-logs/docs/en/configuration/script-scan.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
