Skip to content

Commit

Permalink
Add info message for number of pauses left.
Browse files Browse the repository at this point in the history
  • Loading branch information
splewis committed Oct 1, 2016
1 parent 02ba0e8 commit ee48fbd
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
14 changes: 14 additions & 0 deletions scripting/get5.sp
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,20 @@ public Action Command_Pause(int client, int args) {
}

g_TeamPausesUsed[team]++;

pausePeriodString = "";
if (g_ResetPausesEachHalfCvar.IntValue != 0) {
Format(pausePeriodString, sizeof(pausePeriodString), " %t", "PausePeriodSuffix");
}

int pausesLeft = g_MaxPausesCvar.IntValue - g_TeamPausesUsed[team];
if (pausesLeft == 1) {
Get5_MessageToAll("%t", "OnePauseLeftInfoMessage",
g_FormattedTeamNames[team], g_TeamPausesUsed[team], pausePeriodString);
} else {
Get5_MessageToAll("%t", "PausesLeftInfoMessage",
g_FormattedTeamNames[team], g_TeamPausesUsed[team], pausePeriodString);
}
}

return Plugin_Handled;
Expand Down
10 changes: 10 additions & 0 deletions translations/get5.phrases.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,16 @@
"#format" "{1:s},{2:s}"
"en" "{1} wants to unpause, waiting for {2} to type !unpause."
}
"PausesLeftInfoMessage"
{
"#format" "{1:s},{2:d},{3:s}"
"en" "{1} has {2} pauses left{}."
}
"OnePauseLeftInfoMessage"
{
"#format" "{1:s},{2:d},{3:s}"
"en" "{1} has {2} pause left{}."
}
"TeamFailToReadyMinPlayerCheck"
{
"#format" "{1:d}"
Expand Down

0 comments on commit ee48fbd

Please sign in to comment.