-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
198 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
; hns_deathmatch 0 ; Дезматч мод 1 Включить / 0 Отключить (раскомментировать если отключен плагин hns_lash_grenade) | ||
hns_respawn 3 ; Кол-во секунд возрождения игроков в режиме ДМ | ||
hns_he 0 ; Кол-во HE гранат у команды ТТ | ||
hns_flash 2 ; Кол-во Flash гранат у команды ТТ | ||
hns_smoke 1 ; Кол-во Smoke гранат у команды ТТ | ||
hns_last_he ; Кол-во HE гранат у команды ТТ (Когда ТТ остается последним) | ||
hns_last_flash ; Кол-во Flash гранат у команды ТТ (Когда ТТ остается последним) | ||
hns_last_smoke ; Кол-во Smoke гранат у команды ТТ (Когда ТТ остается последним) | ||
hns_swap_team 2 ; Кол-во выигранных раундов подряд команды ТТ после которого поменять команды местами | ||
hns_swist 1 ; Свист (+USE) у команды ТТ 1 Включить / 0 Отключить | ||
hns_prefix HNS ; Префикс сообщений в чате | ||
hns_ownage_delay 5.0 ; Через сколько секунд засчитывать ownage | ||
hns_start_night 23 ; Во сколько включать ночной дезматч | ||
hns_end_night 9 ; Во сколько отключить ночной дезматч |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#include <amxmodx> | ||
#include <hns_mode_main> | ||
|
||
new g_szPrefix[24]; | ||
|
||
enum HNS_CVAR { | ||
c_iStartNight, | ||
c_iEndNight | ||
}; | ||
|
||
new g_pCvar[HNS_CVAR]; | ||
|
||
new bool:g_bNight; | ||
|
||
public plugin_init() | ||
{ | ||
register_plugin("HNS: Night deathmatch", "1.0", "OpenHNS"); | ||
|
||
bind_pcvar_num(register_cvar("hns_start_night", "23"), g_pCvar[c_iStartNight]); | ||
bind_pcvar_num(register_cvar("hns_end_night", "9"), g_pCvar[c_iEndNight]); | ||
} | ||
|
||
public plugin_cfg() { | ||
if (isNight()) { | ||
set_cvar_num("hns_deathmatch", 1); | ||
g_bNight = true; | ||
} else { | ||
set_cvar_num("hns_deathmatch", 0); | ||
g_bNight = false; | ||
} | ||
|
||
hns_get_prefix(g_szPrefix, charsmax(g_szPrefix)); | ||
} | ||
|
||
public hns_round_start() { | ||
if (isNight() && !g_bNight) { | ||
hns_set_mode(MODE_DEATHMATCH); | ||
client_print_color(0, print_team_blue, "%L", LANG_PLAYER, "NIGHT_START", g_szPrefix); | ||
g_bNight = true; | ||
} else if (!isNight() && g_bNight) { | ||
hns_set_mode(MODE_PUBLIC); | ||
client_print_color(0, print_team_blue, "%L", LANG_PLAYER, "NIGHT_STOP", g_szPrefix); | ||
g_bNight = false; | ||
} | ||
} | ||
|
||
public bool:isNight() { | ||
static iNumChas; time(iNumChas); | ||
|
||
if (g_pCvar[c_iStartNight] > g_pCvar[c_iEndNight]) { | ||
return (iNumChas >= g_pCvar[c_iStartNight] || iNumChas < g_pCvar[c_iEndNight]) ? true : false; | ||
} else { | ||
return (g_pCvar[c_iStartNight] <= iNumChas < g_pCvar[c_iEndNight]) ? true : false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.