From 1ecbc19fdd0e3f6404fdbf3d359d67fc26b87fc5 Mon Sep 17 00:00:00 2001 From: marqdevx Date: Mon, 4 Mar 2024 10:40:59 +0100 Subject: [PATCH] Clean feedback chat and colors --- src/adminsystem.cpp | 15 ++++++--------- src/commands.cpp | 10 +++++----- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/src/adminsystem.cpp b/src/adminsystem.cpp index 570d2cbf..078809dc 100644 --- a/src/adminsystem.cpp +++ b/src/adminsystem.cpp @@ -1265,11 +1265,14 @@ CON_COMMAND_CHAT(record, "Record demo") V_snprintf(actualMap,MAX_PATH, "%s", gpGlobals->mapname); if((std::string)actualMap == "") V_snprintf(actualMap,MAX_PATH, "unknownMap"); + V_snprintf(demoName, MAX_PATH, "%s_%s", actualTime, actualMap); V_snprintf(buf, MAX_PATH, "tv_record gotv/%s", demoName); - ClientPrint(player, HUD_PRINTTALK, buf); g_pEngineServer2->ServerCommand(buf); + + ClientPrint(player, HUD_PRINTTALK, CHAT_PREFIX "Demo will be saved at \4gotv/%s", demoName); + //V_snprintf(buf, MAX_PATH, "record gotv/%s", demoName); /* FormatTime(actualTime, sizeof(actualTime), "%d%B_%H-%M", GetTimestamp()); //https://www.tutorialspoint.com/c_standard_library/c_function_strftime.htm @@ -1302,14 +1305,8 @@ CON_COMMAND_CHAT(stoprecord, "Stop demo recording") ClientPrint(player, HUD_PRINTTALK, CHAT_PREFIX "You don't have access to this command."); return; } - - char buf[256]; - char command[256]; - V_snprintf(buf, MAX_PATH, "Demo saved at gotv/%s", demoName); - ClientPrint(player, HUD_PRINTTALK, buf); + ClientPrint(player, HUD_PRINTTALK, CHAT_PREFIX "Demo saved at \4gotv/%s", demoName); - V_snprintf(command, MAX_PATH, "tv_stoprecord"); - g_pEngineServer2->ServerCommand(command); - + g_pEngineServer2->ServerCommand("tv_stoprecord"); } \ No newline at end of file diff --git a/src/commands.cpp b/src/commands.cpp index b5b13bfa..4b1cff78 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -408,7 +408,7 @@ CON_COMMAND_CHAT(pause, "Request pause") g_pEngineServer2->ServerCommand("mp_pause_match"); - ClientPrintAll(HUD_PRINTTALK, CHAT_PREFIX"%s requested a pause", player->GetPlayerName()); + ClientPrintAll(HUD_PRINTTALK, CHAT_PREFIX"\4%s \1requested a pause", player->GetPlayerName()); match_paused = true; ct_ready = false; @@ -436,15 +436,15 @@ CON_COMMAND_CHAT(unpause, "Request unpause") } if(ct_ready && !t_ready){ - ClientPrintAll(HUD_PRINTTALK, CHAT_PREFIX"CT ready, type .unpause"); + ClientPrintAll(HUD_PRINTTALK, CHAT_PREFIX"CT \5ready\1, type \4.unpause"); return; }else if(!ct_ready && t_ready){ - ClientPrintAll(HUD_PRINTTALK, CHAT_PREFIX"T ready, type .unpause"); + ClientPrintAll(HUD_PRINTTALK, CHAT_PREFIX"T \5ready\1, type \4.unpause"); return; } match_paused = false; - ClientPrintAll(HUD_PRINTTALK, CHAT_PREFIX"Match \2unpaused"); + ClientPrintAll(HUD_PRINTTALK, CHAT_PREFIX"Match \4unpaused"); g_pEngineServer2->ServerCommand("mp_unpause_match"); } @@ -575,7 +575,7 @@ void print_coaches(){ ClientPrintAll(HUD_PRINTTALK, CHAT_PREFIX"\5%i \1active \5coaches", coaches.Count()); FOR_EACH_VEC(coaches,i){ - ClientPrintAll(HUD_PRINTTALK, CHAT_PREFIX"Coach %i: \5%s", i+1, coaches[i]->GetPlayerName()); + ClientPrintAll(HUD_PRINTTALK, CHAT_PREFIX"Coach %i: \4%s", i+1, coaches[i]->GetPlayerName()); } }