Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Commit

Permalink
Clean feedback chat and colors
Browse files Browse the repository at this point in the history
  • Loading branch information
marqdevx committed Mar 4, 2024
1 parent 3fe24f0 commit 1ecbc19
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
15 changes: 6 additions & 9 deletions src/adminsystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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");
}
10 changes: 5 additions & 5 deletions src/commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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");
}

Expand Down Expand Up @@ -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());
}
}

Expand Down

0 comments on commit 1ecbc19

Please sign in to comment.