---
title: "UsefulHints: Class-D friendly fire warnings in C# | VulCode"
description: "A fix in UsefulHints, an SCP: Secret Laboratory plugin in C#: the class_d_are_teammates option turns off the warning when Class-D players hurt each other."
url: "https://vulcode.com/en/opensource/contributions/usefulhints"
lang: "en"
---

[All contributions](https://vulcode.com/en/opensource/contributions)

Vretu-Dev/UsefulHints

# UsefulHints

A plugin for SCP: Secret Laboratory on Exiled and LabAPI that shows players extra hints: item timers, warnings, a kill counter and friendly fire warnings.

[See the repository](https://github.com/Vretu-Dev/UsefulHints) [All contributions](https://vulcode.com/en/opensource/contributions)

- **Language**: C#
- **GitHub stars**: 18
- **Merged changes**: 1

## What we changed

The class_d_are_teammates option now works: set to false, it stops the friendly fire warning when two Class-D players hurt each other. Other pairs from the same side still get it as before.

### What this work shows

- SCP: Secret Laboratory plugins on Exiled

- Game event handling in C#

- Game server plugin configuration

What was broken

### The Class-D option had no effect

In FFWarning.OnHurting the if branch that checked ClassDAreTeammates and the else branch did the same thing: they showed the attacker a warning and told the victim who hit them. Setting class_d_are_teammates: false changed nothing, and the warning still appeared when one Class-D player hurt another.

How we fixed it

### The warning is skipped only for Class-D

One condition replaces the two branches: the warning shows unless both players are Class-D and ClassDAreTeammates is off. Other pairs from the same side, such as MTF or Chaos, work as before.

[#12](https://github.com/Vretu-Dev/UsefulHints/pull/12)

## Merged change 1

- [#12 Fix ClassDAreTeammates config being ignored for Class-D friendly fire Merged 16 November 2026](https://github.com/Vretu-Dev/UsefulHints/pull/12)

## What it taught us

Reading the code, we catch bugs nobody has reported. Here identical if and else branches meant a config option had no effect at all.

[More about this technology: C# and .NET](https://vulcode.com/en/technologies/csharp-and-dotnet)

## Other projects we write code for

- [**ILSpy** C# · 27,138 stars An open source .NET decompiler that turns compiled assemblies back into readable C# code. It is used to inspect libraries whose source code is not at hand.](https://vulcode.com/en/opensource/contributions/ilspy)

- [**OpenRA** C# · 17,827 stars An open source real-time strategy engine for classic Westwood games such as Command & Conquer: Red Alert, written in C# with SDL and OpenGL.](https://vulcode.com/en/opensource/contributions/openra)

- [**Polly** C# · 14,255 stars A .NET library for handling transient faults: retries, circuit breakers, timeouts and fallback. Its Simmy module injects faults on purpose to test how an application copes with them.](https://vulcode.com/en/opensource/contributions/polly)

- [**FluentValidation** C# · 9,780 stars A popular .NET library for writing strongly typed validation rules in a fluent style, such as RuleFor(...).InclusiveBetween(...).](https://vulcode.com/en/opensource/contributions/fluentvalidation)

- [**Serilog** C# · 8,064 stars A structured logging library for .NET. It records events from message templates, with named properties rather than plain text.](https://vulcode.com/en/opensource/contributions/serilog)

- [**NLog** C# · 6,547 stars A flexible structured logging library for many .NET platforms, configured through layouts, filters and targets.](https://vulcode.com/en/opensource/contributions/nlog)

## Describe your project.

A free quote comes back within an hour during working hours.

### Rather skip the form?

Ask in the chat or write to us directly.

Open the chat

- **Email**: [hello@vulcode.com](mailto:hello@vulcode.com)
- **Phone**: [+48 576 043 920](tel:+48576043920)
- **Discord**: [discord.gg/vulcode](https://discord.gg/vulcode)
