From 698d4ecd91815e6e84c06a59d84f2f2fe9d36649 Mon Sep 17 00:00:00 2001 From: z411 Date: Sun, 27 Mar 2022 02:16:43 -0300 Subject: [PATCH] Add chat prefixes --- qcsrc/server/chat.qc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/qcsrc/server/chat.qc b/qcsrc/server/chat.qc index a73de2a1f..1cbc8ec80 100644 --- a/qcsrc/server/chat.qc +++ b/qcsrc/server/chat.qc @@ -62,8 +62,15 @@ int Say(entity source, int teamsay, entity privatesay, string msgin, bool floodc string namestr = ""; if (source) + { namestr = playername(source.netname, source.team, (autocvar_g_chat_teamcolors && IS_PLAYER(source))); + if (IS_DEAD(source) || source.frags == FRAGS_PLAYER_OUT_OF_GAME) + namestr = strcat(_("(DEAD)"), " ", namestr); + else if (IS_OBSERVER(source) || IS_SPEC(source)) + namestr = strcat(_("(s)"), " ", namestr); + } + string colorprefix = (strdecolorize(namestr) == namestr) ? "^3" : "^7"; string msgstr = "", cmsgstr = ""; -- 2.39.2