Skip to content

Commit

Permalink
make most of the timeleft messages silent
Browse files Browse the repository at this point in the history
  • Loading branch information
rtldg committed Jan 11, 2022
1 parent cdd8c56 commit 6921f38
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions addons/sourcemod/scripting/shavit-timelimit.sp
Original file line number Diff line number Diff line change
Expand Up @@ -341,17 +341,21 @@ public Action Timer_PrintToChat(Handle timer)
Shavit_StopChatSound();
}

char timebuf[12];

switch(timeleft)
{
case 3600: Shavit_PrintToChatAll("%T", "Minutes", LANG_SERVER, "60");
case 1800: Shavit_PrintToChatAll("%T", "Minutes", LANG_SERVER, "30");
case 1200: Shavit_PrintToChatAll("%T", "Minutes", LANG_SERVER, "20");
case 600: Shavit_PrintToChatAll("%T", "Minutes", LANG_SERVER, "10");
case 300: Shavit_PrintToChatAll("%T", "Minutes", LANG_SERVER, "5");
case 120: Shavit_PrintToChatAll("%T", "Minutes", LANG_SERVER, "2");
case 60: Shavit_PrintToChatAll("%T", "Seconds", LANG_SERVER, "60");
case 30: Shavit_PrintToChatAll("%T", "Seconds", LANG_SERVER, "30");
case 15: Shavit_PrintToChatAll("%T", "Seconds", LANG_SERVER, "15");
case 3600, 1800, 1200, 600, 300, 120:
{
IntToString(timeleft/60, timebuf, sizeof(timebuf));
Shavit_StopChatSound();
Shavit_PrintToChatAll("%T", "Minutes", LANG_SERVER, timebuf);
}
case 60, 30, 15:
{
IntToString(timeleft, timebuf, sizeof(timebuf));
Shavit_PrintToChatAll("%T", "Seconds", LANG_SERVER, timebuf);
}

case 0: // case 0 is hit twice....
{
Expand Down

1 comment on commit 6921f38

@ddorab
Copy link

@ddorab ddorab commented on 6921f38 Jan 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very small update but worth it so I'm updating

Please sign in to comment.