> 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/events.md).

# Events

### Server to client

| Event                               | What it does                                                         |
| ----------------------------------- | -------------------------------------------------------------------- |
| `sbanticheat:client:setWhitelisted` | Sent when a player's whitelist changes. Payload: `boolean`.          |
| `sbanticheat:client:healEvent`      | Tells the client a heal is coming, so the health jump isn't flagged. |
| `sbanticheat:client:removeNoclip`   | Forces noclip off for a player.                                      |
| `sbanticheat:client:forceScan`      | Starts an immediate OCR scan (debug mode only).                      |

### Healing players from the server

Trigger `healEvent` before you set health, so the heal isn't flagged as a health cheat:

```lua
TriggerClientEvent("sbanticheat:client:healEvent", source)
SetEntityHealth(GetPlayerPed(source), 200)
```

You can also use `AllowDetection("health", 3, source)` from a trusted resource. See [Trusted Resources](/sb-scripts/sb-anticheat/trusted-resources.md).
