Add gag query to BaseChat – Kerem ER

Add gag query to BaseChat

22 Şubat 2018, 16:41
367 görüntüleme

By default, sending a message to the authorities via chat, which is set to the “@” tag, sends it without checking if the sender has found an active gag penalty. This issue can cause the player to still annoy the authorities from the authorized chat, even though the player has received a gag penalty.

First step

Put it on top line

#include <basecomm>

Second step

Add this instead of “if (IsClientInGame(i) && (from == i || Ch…” in void “SendChatToAdmins” (Line: 363 in version 1.8.0.6015)

if (!BaseComm_IsClientGagged(i))
  {
    CPrintToChat(i, "[SM] %s%N: %s", fromAdmin ? "(Admin) " : "(Player) ", from, message);
  }

Last step

Compile the file.