# Friendly Fire & the Teamkill Detector on SCP:SL (/docs/scp-secret-laboratory/friendly-fire-and-ff-detector)



import { Step, Steps } from 'fumadocs-ui/components/steps';

Enabling friendly fire on SCP: Secret Laboratory also turns on the **teamkill detector** — an automatic system that can kill, kick, or **ban** players who deal too much damage to teammates. If you switch friendly fire on without tuning the detector, you can end up auto-banning players for normal chaotic play. This page shows how to do both.

All of these settings live in `config_gameplay.txt` — see [Config File Locations](/docs/scp-secret-laboratory/config-file-locations), and **Stop the server before editing** (it rewrites the file on shutdown).

Enable Friendly Fire [#enable-friendly-fire]

| Setting                    | Default | What it does                                                                |
| -------------------------- | ------- | --------------------------------------------------------------------------- |
| `friendly_fire`            | `false` | Set `true` to let players damage teammates.                                 |
| `friendly_fire_multiplier` | `0.4`   | Fraction of damage applied to teammates (`0.4` = 40%; `1.0` = full damage). |

How the Teamkill Detector Works [#how-the-teamkill-detector-works]

The detector watches how much damage/how many kills a player inflicts on teammates within a time window and performs an **action** when a threshold is crossed. Set a threshold's `kills` **or** `damage` to `0` to disable that threshold.

There are four detector windows, checked in this priority order:

1. **Respawn** — resets each respawn wave
2. **Window** — a short rolling window
3. **Life** — resets when the player dies/respawns
4. **Round** — the whole round

Each window has the same set of keys (shown here for **round** and **life**, the two most-used):

| Setting                                                    | Default (round / life) | What it does                                                |
| ---------------------------------------------------------- | ---------------------- | ----------------------------------------------------------- |
| `ff_detector_round_enabled` / `ff_detector_life_enabled`   | `false` / `false`      | Turn this detector on.                                      |
| `ff_detector_round_kills` / `ff_detector_life_kills`       | `6` / `4`              | Teamkills that trigger the action (`0` = ignore kills).     |
| `ff_detector_round_damage` / `ff_detector_life_damage`     | `500` / `300`          | Team damage that triggers the action (`0` = ignore damage). |
| `ff_detector_round_action` / `ff_detector_life_action`     | `ban` / `ban`          | What to do: `kill`, `kick`, `ban`, or `noop` (log only).    |
| `ff_detector_round_ban_time` / `ff_detector_life_ban_time` | `24h` / `24h`          | Ban length when the action is `ban`.                        |

> 📝 **Note:** The **window** and **respawn** detectors use the same key pattern (`ff_detector_window_*`, `ff_detector_respawn_*`). Leave the ones you don't use disabled.

Other detector options:

| Setting                                | Default | What it does                                                                       |
| -------------------------------------- | ------- | ---------------------------------------------------------------------------------- |
| `ff_detector_classD_can_damage_classD` | `false` | Let Class-D hurt other Class-D without triggering the detector.                    |
| `ff_detector_round_broadcast_enable`   | `true`  | Announce the punishment in-game.                                                   |
| `ff_detector_round_webhook_report`     | `true`  | Send the report to `ff_detector_webhook_url` if set.                               |
| `ff_detector_webhook_url`              | `none`  | Discord webhook for teamkill reports (`none` = use the cheater-reporting webhook). |

Recipes [#recipes]

Friendly fire on, no auto-bans (casual / chaos server) [#friendly-fire-on-no-auto-bans-casual--chaos-server]

<Steps>
  <Step>
    Enable FF [#enable-ff]

    Set `friendly_fire: true` (and, if you like, raise `friendly_fire_multiplier`).
  </Step>

  <Step>
    Disable the ban detectors [#disable-the-ban-detectors]

    Set every detector's action to `noop` (or set `..._enabled: false`), e.g. `ff_detector_round_action: noop` and `ff_detector_life_action: noop`. Players can teamkill freely; you just won't auto-punish.
  </Step>

  <Step>
    Restart [#restart]

    Save and start the server.
  </Step>
</Steps>

Friendly fire on, but punish deliberate teamkillers (serious server) [#friendly-fire-on-but-punish-deliberate-teamkillers-serious-server]

Keep the detectors **enabled** with `action: ban`, and tune thresholds to taste — lower `kills`/`damage` = stricter. A common setup: `ff_detector_life_enabled: true`, `ff_detector_life_kills: 3`, `ff_detector_life_action: kick`, escalating to a `round` ban for repeat offenders.

<Callout type="warn">
  Test your thresholds. Accidental teamkills happen in normal play — set them too low with `action: ban` and you'll ban legitimate players. Start with `kick`, watch your logs, then tighten.
</Callout>

Related [#related]

* [config\_gameplay.txt Reference](/docs/scp-secret-laboratory/gameplay-config-reference)
* [Banning & Unbanning](/docs/scp-secret-laboratory/remote-admin-permissions)
