Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
WessTorn committed Jan 17, 2024
1 parent 88834c4 commit b1c39e3
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 22 deletions.
21 changes: 16 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ Counter-Strike Hide'n'Seek Match System plugins.
- [ReSemiclip (last)](https://dev-cs.ru/resources/71/updates)

## Характеристики
- Public / DeathMatch / Zombie / Knife / Captain mode
- MR match system
- Public / DeathMatch / Knife / Captain mode
- MR / Wintime match system
- Watcher (admin) menu (N)
- Система зависит от администратора
- Система зависит от администратора.
- Surrender
- AFK contol
- AFK, Player leave contol

## Установка

Expand Down Expand Up @@ -95,9 +95,16 @@ Counter-Strike Hide'n'Seek Match System plugins.

По истечению раундов (14) та команда, у которой больше таймер победила.

- Матч - Wintime режим

Командам дается определенное кол-во времени (15)
У команды, которая играет за террористов время отнимается.
Та команда, у которой закончилось время, победила.

## Плагины
- HnsMatchSystem.sma - Основной плагин мода
- HnsMatchStats.sma - Плагин статистики микса
- HnsMatchPlayerInfo.sma - Hud информация игрока
- HnsMatchSql.sma - Плагин для взаимодействия с БД
- HnsMatchPts.sma - Плагин для ПТС (не работает без Sql плагина)
- HnsMatchOwnage.sma - Плагин для подсчета Ownage (не работает без Sql плагина)
Expand All @@ -111,6 +118,8 @@ Counter-Strike Hide'n'Seek Match System plugins.

| Cvar | Default | Description |
| :------------------- | :--------: | :--------------------------------------------------- |
| hns_rules | 0 | Режим по умолчанию (0 - MR 1 - Timer) |
| hns_wintime | 15 | Время для победы |
| hns_rounds | 6 | Кол-во раундов для победы |
| hns_boost | 0 | Включить/Отключить буст режим |
| hns_onehpmode | 0 | Включить/Отключить 1 хп режим |
Expand All @@ -132,6 +141,8 @@ Counter-Strike Hide'n'Seek Match System plugins.
| :------------------- | :--------------------------------------------------- |
| mix | Админ меню |
| mode / type | Мод меню |
| timer / wintime | Изменить режим микса на Таймер |
| mr / maxround | Изменить режим микса на Мр |
| training | Тренировочное меню |
| pub / public | Паблик мод |
| dm / deathmatch | ДМ мод |
Expand All @@ -148,7 +159,7 @@ Counter-Strike Hide'n'Seek Match System plugins.
| swap / swap | Поменять команды местами |
| pause / ps | Пауза |
| live / unpause | Запуск |
| mr | Выставить кол-во раундов |
| mr 5 | Выставить кол-во раундов |

- Player

Expand Down
17 changes: 14 additions & 3 deletions README_ENG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ Counter-Strike Hide'n'Seek Match System plugins
- [ReSemiclip (last)](https://dev-cs.ru/resources/71/updates)

## Characteristics
- Public / DeathMatch / Zombie / Knife / Captain mode
- MR match system
- Public / DeathMatch / Knife / Captain mode
- MR / Wintime match system
- Watcher (admin) menu (N)
- System is admin dependent
- Surrender
- AFK contol
- AFK, Player leave contol

## Installation

Expand Down Expand Up @@ -89,9 +89,16 @@ Counter-Strike Hide'n'Seek Match System plugins

At the end of the rounds (14), the team with the higher timer wins.

- Match - Wintime mode

Teams are given a certain amount of time (15).
The team that plays for the terrorists has their time taken away.
The team that runs out of time wins.

## Plugins
- HnsMatchSystem.sma - Main mod plugin
- HnsMatchStats.sma - Mix statistics plugin
- HnsMatchPlayerInfo.sma - Hud player info
- HnsMatchSql.sma - Plugin for interacting with the database
- HnsMatchPts.sma - Plugin for PTS (does not work without Sql plugin)
- HnsMatchOwnage.sma - Plugin for calculating Ownage (does not work without Sql plugin)
Expand All @@ -105,6 +112,8 @@ Counter-Strike Hide'n'Seek Match System plugins

| Cvar | Default | Description |
| :------------------- | :--------: | :--------------------------------------------------- |
| hns_rules | 0 | Match rules (0 - MR 1 - Timer) |
| hns_wintime | 15 | Time to win |
| hns_rounds | 6 | rounds to win |
| hns_boost | 0 | Enable/Disable Boost Mode |
| hns_onehpmode | 0 | Enable/Disable 1hpmode |
Expand All @@ -126,6 +135,8 @@ Counter-Strike Hide'n'Seek Match System plugins
| :------------------- | :--------------------------------------------------- |
| mix | admin menu |
| mode / type | mod menu |
| timer / wintime | Change the mix mode to Timer |
| mr / maxround | Change the mix mode to MR |
| training | training menu |
| pub / public | public | public mod |
| dm / deathmatch | DM mod |
Expand Down
4 changes: 2 additions & 2 deletions data/lang/mixsystem.txt
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ MENU_MODE_MR = MR System
MENU_MODE_WINTIME = Wintime

VOTE_MR = ^3%n^1 voted for ^3MR^1!
VOTE_WT = ^3%n^1 voted for ^3WintimeY1!
VOTE_WT = ^3%n^1 voted for ^3Wintime^1!
VOTE_WIN = ^3%s^1 mode won the vote!

MENU_VERIF_TITLE = \rVerification menu^n^n\dAre you sure you want to stop this mod:
Expand Down Expand Up @@ -331,7 +331,7 @@ MENU_MODE_MR = MR System
MENU_MODE_WINTIME = Wintime

VOTE_MR = ^3%n^1 выбрал ^3MR^1!
VOTE_WT = ^3%n^1 выбрал ^3WintimeY1!
VOTE_WT = ^3%n^1 выбрал ^3Wintime^1!
VOTE_WIN = Режим ^3%s^1 победил в голосовании!

MENU_VERIF_TITLE = \rМеню подтверждения^n^n\dВы уверены, что хотите остановить матч?
Expand Down
44 changes: 33 additions & 11 deletions scripting/HnsMatchPlayerInfo.sma
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <amxmodx>
#include <amxmisc>
#include <reapi>

#include <hns_matchsystem>
Expand All @@ -18,17 +19,18 @@ new Float:g_flCmdNextUseTime[MAX_PLAYERS + 1];
new g_MsgSync;

public plugin_init() {
register_plugin("Match: Player info", "1.0", "OpenHNS");
register_plugin("Match: Player info", "1.0", "OpenHNS");

RegisterSayCmd("hud", "hudinfo", "cmdHUDInfo", 0, "Show hud info");
RegisterSayCmd("dmg", "lastdmg", "cmdLastDmg", 0, "Show last dmg player");
register_clcmd("say", "sayHandle");

RegisterHookChain(RG_CSGameRules_RestartRound, "rgRoundStart", true);
RegisterHookChain(RG_CBasePlayer_TakeDamage, "rgTakeDamage", true);
RegisterSayCmd("hud", "hudinfo", "cmdHUDInfo", 0, "Show hud info");

set_task(1.0, "task_ShowPlayerInfo", .flags = "b");

g_MsgSync = CreateHudSyncObj();
RegisterHookChain(RG_CSGameRules_RestartRound, "rgRoundStart", true);
RegisterHookChain(RG_CBasePlayer_TakeDamage, "rgTakeDamage", true);

set_task(1.0, "task_ShowPlayerInfo", .flags = "b");

g_MsgSync = CreateHudSyncObj();
}

public client_putinserver(id) {
Expand All @@ -45,8 +47,26 @@ public cmdHUDInfo(id) {
return PLUGIN_HANDLED;
}

public cmdLastDmg(id) {
new Float:flGameTime = get_gametime();
public sayHandle(id) {
new szArgs[64];
read_args(szArgs, charsmax(szArgs));
remove_quotes(szArgs);
trim(szArgs);

if (szArgs[0] != '/') {
return PLUGIN_CONTINUE;
}

new pattern[32];
strtok2(szArgs, szArgs, charsmax(szArgs), pattern, charsmax(pattern), ' ');

if(!equali(szArgs, "/dmg")) {
return PLUGIN_CONTINUE;
}

trim(pattern);

new Float:flGameTime = get_gametime();

if(g_flCmdNextUseTime[id] > flGameTime) {
client_print_color(id, print_team_blue, "%s Please wait ^3%.1f^1 seconds between commands!", g_szPrefix, g_flCmdNextUseTime[id] - flGameTime);
Expand All @@ -65,10 +85,12 @@ public cmdLastDmg(id) {
if (g_flDmg[iTarget]) {
client_print_color(0, print_team_blue, "%s ^3%n^1's fall damage ^3%.0f^1 HP - before ^3%.0f^1 - ^3%s^1 HP, ^3%.1f^1 seconds ago.", g_szPrefix, iTarget, g_flDmg[iTarget], g_flHealthBefore[iTarget], g_bDmgThisRound[iTarget] ? "^4Этот раунд" : "Не этот раунд", get_gametime() - g_flDmgTime[iTarget]);
}

return PLUGIN_CONTINUE;
}

public rgRoundStart(id) {
arrayset(g_bDmgThisRound, false, sizeof(g_bDmgThisRound));
arrayset(g_bDmgThisRound, false, sizeof(g_bDmgThisRound));
}

public rgTakeDamage(victim, inflictor, attacker, Float:damage, damagebits) {
Expand Down
2 changes: 1 addition & 1 deletion scripting/include/hns-match/addition/cvars.inc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ new _:g_iSettings[CVARS];
stock cvars_init() {
g_pRoundTime = get_cvar_pointer("mp_roundtime");

pCvar[RULES] = create_cvar("hns_rules", "0", FCVAR_NONE, "Match rules 0 - MR 1 - Timer)", true, 0.0, true, 1.0);
pCvar[RULES] = create_cvar("hns_rules", "0", FCVAR_NONE, "Match rules (0 - MR 1 - Timer)", true, 0.0, true, 1.0);
bind_pcvar_num(pCvar[RULES], g_iSettings[RULES]);

pCvar[WINTIME] = _:create_cvar("hns_wintime", "15", FCVAR_NONE, "Match wintime (Timer)", true, 0.0, true, 30.0);
Expand Down

0 comments on commit b1c39e3

Please sign in to comment.