Skip to content

Repository files navigation

SourceBans++ Spectate Report

Unofficial third-party sub-plugin — Not affiliated with, endorsed by, or maintained by the SourceBans++ Dev Team.

Languages: English | 简体中文 | 繁體中文 | Русский | Deutsch | Français | Polski | Português | Magyar | Türkçe

An unofficial SourceBans++ sub-plugin for SourceMod that allows players to press the R key (reload) to report the spectated player while in non-roaming spectate mode. Designed primarily for No More Room in Hell (NMRiH) but compatible with any Source engine game running SourceBans++.

Features

  • R key to report — Press R while spectating a player in first-person or third-person mode to initiate a report.
  • Non-roaming only — Reports are only allowed in OBS_MODE_IN_EYE (4) and OBS_MODE_CHASE (5); roaming spectate is ignored.
  • On-screen hint — Periodically displays a hint text showing the spectated target's name and the R key prompt.
  • Reason input — After pressing R, the player types the reason in chat. Type cancel to abort.
  • Minimum reason length — Configurable minimum characters to prevent empty or low-effort reports.
  • Cooldown — Per-player cooldown between reports to prevent spam.
  • Multi-language — Ships with 10 languages matching the SourceBans++ translation coverage.
  • No audio — Visual-only feedback, no sound effects.

Requirements

Component Version
SourceMod 1.11 or later
SourceBans++ 2.0.0 or later (sbpp_main.smx must be loaded)
Game Any Source engine game (tested with NMRiH)

Installation

  1. Download the latest release.
  2. Extract the archive.
  3. Copy the contents of common/addons/sourcemod/ into your server's addons/sourcemod/ directory:
    • plugins/sbpp_specrep.smx
    • translations/sbpp_specrep.phrases.txt
    • configs/sourcebans/sbpp_specrep.cfg
  4. Restart the server or run sm plugins load sbpp_specrep in the server console.

Configuration

The config file is located at addons/sourcemod/configs/sourcebans/sbpp_specrep.cfg:

"SourceBans++ Spectate Report"
{
    "Config"
    {
        // Enable spectate report feature (0=disabled, 1=enabled)
        "Enable"        "1"

        // Cooldown in seconds between reports per player
        "Cooldown"      "60.0"

        // Minimum reason length (characters), shorter reasons will be rejected
        "MinLen"        "10"
    }
}
Option Type Default Description
Enable int 1 Enable or disable the plugin (0 = off, 1 = on)
Cooldown float 60.0 Cooldown in seconds between reports per player
MinLen int 10 Minimum reason length in characters

Commands

Command Permission Description
sm_specrep_reload ADMFLAG_CONFIG Reload the config file at runtime
sm_specrep_status ADMFLAG_GENERIC Show plugin status and current player spectate state

How It Works

  1. Detection — A repeating timer (0.2s interval) checks each dead player's observer mode.
  2. Hint display — If the player is spectating another player in first-person or third-person mode, a hint text is displayed every 4 seconds.
  3. Key press — The R key (reload) is detected via both OnPlayerRunCmd (button bits) and AddCommandListener("+reload") as a fallback.
  4. Reason input — After pressing R, the player enters reason-input mode. The next chat message becomes the report reason.
  5. Submission — The report is submitted via the SBPP_ReportPlayer native provided by sbpp_main.smx.

Translation Keys

The plugin ships with its own translation file sbpp_specrep.phrases.txt covering 10 languages:

Key Description
Press R to Report Hint text shown while spectating
Spectate Report Prompt Chat prompt after pressing R
No Valid Target Shown when spectate target is invalid
In Cooldown Shown when player is on cooldown
Report Canceled Shown when player types cancel
Report Sent Shown after successful submission
Reason Short Need More Shown when reason is too short

Compatibility

  • SourceBans++ 2.0.0 / 2.0.1 / 2.0.2 — Tested with the plugin-only package.
  • SourceMod 1.11 / 1.12 — Compiled with SourcePawn Compiler 1.12.0.7230.
  • NMRiH — Primary test environment.
  • Other Source games — Should work on any game where m_iObserverMode and m_hObserverTarget are available (CS:S, CS:GO, TF2, DoD:S, HL2:DM).

License

This project is licensed under the GNU General Public License v3.0 or later.

As a derivative work of SourceBans++ (which is licensed under GPLv3), this plugin inherits the GPLv3 license. The bundled header files (sourcebanspp.inc, sbpp_version.inc) are reproduced verbatim from the SourceBans++ distribution for compilation purposes under GPLv3 §5(a).

This plugin also links against the SourceMod SDK at runtime, which is licensed under GPLv3 with the AlliedModders link exception.

Author

Baimiao2534

Acknowledgements

Topics

sourcemod sourcebans sourcebans-pp sbpp nmrih plugin report spectate unofficial gpl3

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages