> For the complete documentation index, see [llms.txt](https://sbscripts.gitbook.io/sb-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sbscripts.gitbook.io/sb-scripts/sb-anticheat/installation.md).

# Installation

1. Put the `sbanticheat` folder in your `resources` directory.
2. Import `sbanticheat_install.sql` into your database. You need `oxmysql` running.
3. Add this to `server.cfg`, after your framework and `oxmysql`:

```cfg
ensure sbanticheat
```

4. Open `shared/config.lua` and set your framework, server name and punishments.
5. Open `server_config.lua` and paste in your Discord webhooks and bot token.
6. Open `shared/models.lua` and add the props, peds and vehicles that fit your server.

> ⚠️ Keep secrets out of `shared/`. Everything in `shared/` is downloaded by every player who joins, so webhooks and tokens go in `server_config.lua`, which only the server loads.

### Where the settings live

| File                         | What it's for                                                                                                   |
| ---------------------------- | --------------------------------------------------------------------------------------------------------------- |
| `shared/config.lua`          | Main settings: framework, punishments, every detection, anti-spam limits, panel, logging.                       |
| `shared/models.lua`          | Model lists: blacklisted peds, vehicles, weapons, objects, particles and explosions, plus the object whitelist. |
| `shared/trustedresource.lua` | Which of your resources may ask for a short detection bypass.                                                   |
| `shared/safeevents.lua`      | The list of server events protected from executors.                                                             |
| `server_config.lua`          | Discord webhooks, the bot token and the screenshot webhook.                                                     |
| `locale/*.lua`               | Ban and kick screen text. Set `SB.locale` to `en`, `es`, `de`, `fr`, `pt` or `it`.                              |

See [Configuration](/sb-scripts/sb-anticheat/configuration.md) for the full settings reference.
