Skip to content

Commit

Permalink
Release 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dronelektron committed Dec 29, 2021
2 parents 85fcc47 + e2dbaf8 commit 3b1770d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Allows you to block the spectators team at the end of the round or earlier
### Console Variables

* sm_blockspectators - Enable (1) or disable (0) spectators team blocking [default: "1"]
* sm_blockspectators_notifications_mode - None - 0, Join attempt - 1, Round end - 2, Early - 4 [default: "7"]
* sm_blockspectators_notifications_mode - None - 0, Join attempt - 1, Round end - 2, Timer - 4 [default: "7"]
* sm_blockspectators_time_offset - Time offset (in seconds) until the end of the round [default: "0"]

### Notification flags
Expand All @@ -23,12 +23,12 @@ Use a sum of flags to manage notifications.

For example:

* Mode 7 includes: Join attempt (1) + Round end (2) + Early (4)
* Mode 5 includes: Join attempt (1) + Early (4)
* Mode 7 includes: Join attempt (1) + Round end (2) + Timer (4)
* Mode 5 includes: Join attempt (1) + Timer (4)

Flags description:

* None (0) - notifications disabled
* Join attempt (1) - when the player tries to join the spectators team
* Round end (2) - at the end of the round
* Early (4) - when the block timer was triggered
* Timer (4) - when the block timer was triggered
8 changes: 4 additions & 4 deletions scripting/block-spectators.sp
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@

#define NOTIFICATIONS_JOIN_ATTEMPT (1 << 0)
#define NOTIFICATIONS_ROUND_END (1 << 1)
#define NOTIFICATIONS_EARLY (1 << 2)
#define NOTIFICATIONS_TIMER (1 << 2)

public Plugin myinfo = {
name = "Block spectators",
author = "Dron-elektron",
description = "Allows you to block the spectators team at the end of the round or earlier",
version = "0.3.0",
version = "0.4.0",
url = ""
};

Expand All @@ -35,7 +35,7 @@ bool g_isRoundTimerExists = ROUND_TIMER_EXISTS_DEFAULT_VALUE;

public void OnPluginStart() {
g_pluginEnabled = CreateConVar("sm_blockspectators", "1", "Enable (1) or disable (0) spectators team blocking");
g_notificationsMode = CreateConVar("sm_blockspectators_notifications_mode", "7", "None (0), Join attempt (1), Round end (2), Early (4)");
g_notificationsMode = CreateConVar("sm_blockspectators_notifications_mode", "7", "None (0), Join attempt (1), Round end (2), Timer (4)");
g_blockTimeOffset = CreateConVar("sm_blockspectators_time_offset", "0", "Time offset (in seconds) until the end of the round");

HookEvent("dod_round_start", Event_RoundStart);
Expand Down Expand Up @@ -121,7 +121,7 @@ void ExtendBlockTimer(int secondsAdded) {

public Action Timer_BlockSpectators(Handle timer) {
g_blockTimer = null;
BlockSpectators(NOTIFICATIONS_EARLY);
BlockSpectators(NOTIFICATIONS_TIMER);

return Plugin_Continue;
}
Expand Down

0 comments on commit 3b1770d

Please sign in to comment.