Skip to content

Commit

Permalink
v1.1.8.9
Browse files Browse the repository at this point in the history
  • Loading branch information
WessTorn committed Jun 19, 2021
1 parent 52bdb16 commit b05ff21
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 85 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ Counter-Strike Hide'n'Seek Match System plugins
- Новый pts
- Captain на всех картах
- Инклуд для взаимодействия с другими плагинами
- Переделать motd top players

## Благодарности / Aвторы других плагинов
[Garey - Мixsystem](https://github.com/Garey27)
Expand Down
1 change: 0 additions & 1 deletion data/lang/mixsystem.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ NOT_SET_MR = %s Disable timer mode, before changing maxrounds.

KILL_HIMSELF = %s ^3%s ^1killed himself
KILL_NOT = %s Kill during deathmatch is not available.
PLR_DISC = %s Player ^3%n^1 was disconnected..

SUR_WAIT = %s Wait ^3%s^1 for surrender!
SUR_PLAYER = %s Player ^3%n^1 (^3%s^1) started vote for surrender!
Expand Down
6 changes: 3 additions & 3 deletions scripting/HnsMatchSystem.sma
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public plugin_precache() {
}

public plugin_init() {
register_plugin("Hide'n'Seek Match System", "1.1.8.8", "??"); // Спасибо: Cultura, Garey, Medusa, Ruffman, Conor
register_plugin("Hide'n'Seek Match System", "1.1.8.9", "??"); // Спасибо: Cultura, Garey, Medusa, Ruffman, Conor

get_mapname(g_eMatchInfo[e_mMapName], charsmax(g_eMatchInfo[e_mMapName]));

Expand Down Expand Up @@ -227,7 +227,7 @@ public taskPrepareMode(mode) {
loadMapCFG();

new iPlayers[MAX_PLAYERS], iNum;
get_players(iPlayers, iNum, "ce", "TERRORIST");
get_players(iPlayers, iNum, "e", "TERRORIST");
g_eMatchInfo[e_mTeamSizeTT] = iNum;

fnConvertTime(get_pcvar_float(g_eCvars[e_cCapTime]) * 60.0, g_eMatchInfo[e_mWinTime], charsmax(g_eMatchInfo[e_mWinTime]));
Expand Down Expand Up @@ -269,7 +269,7 @@ public plugin_cfg() {
restartRound(Float:delay = 0.5) {
if (g_bSurvival) {
new iPlayers[32], iNum;
get_players(iPlayers, iNum, "c");
get_players(iPlayers, iNum);

g_flSidesTime[g_iCurrentSW] -= g_flRoundTime;

Expand Down
4 changes: 2 additions & 2 deletions scripting/include/hns-match/afk.inc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public taskCheckAfk() {
}

new iPlayers[MAX_PLAYERS], iNum;
get_players(iPlayers, iNum, "ache", "TERRORIST");
get_players(iPlayers, iNum, "ach");

for(new i; i < iNum; i++) {
new id = iPlayers[i];
Expand Down Expand Up @@ -107,7 +107,7 @@ stock bool:PlayerIsAfk(id) {

public taskSaveAfk() {
new iPlayers[MAX_PLAYERS], iNum;
get_players(iPlayers, iNum, "ache", "TERRORIST");
get_players(iPlayers, iNum, "ach");

for(new i; i < iNum; i++) {
new id = iPlayers[i];
Expand Down
13 changes: 5 additions & 8 deletions scripting/include/hns-match/hnsmenu.inc
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public mainMatchMenu(id) {
menu_additem(hMenu, "Team Transfer Player", "6");
menu_additem(hMenu, "Change map", "7");

menu_display(id, hMenu);
menu_display(id, hMenu, 0);
}

public mainMatchMenuHandler(id, hMenu, item) {
Expand Down Expand Up @@ -172,10 +172,7 @@ public customMenuHandler(id, hMenu, item) {
}

public settingsMatchMenu(id) {
if (~get_user_flags(id) & access)
return;

if (!is_user_connected(id))
if (!is_user_connected(id) || !getUserInAccess(id))
return;

new title[64];
Expand Down Expand Up @@ -329,7 +326,7 @@ public verifMenu(id) {
menu_additem(hMenu, "Yes");

menu_setprop(hMenu, MPROP_EXIT, MEXIT_NEVER);
menu_display(id, hMenu);
menu_display(id, hMenu, 0);
}

public verifMenuHandler(id, hMenu, item) {
Expand Down Expand Up @@ -361,7 +358,7 @@ public trainingMenu(id) {
menu_additem(hMenu, "Respawn", "4");
menu_additem(hMenu, "Damage", "5");

menu_display(id, hMenu);
menu_display(id, hMenu, 0);
}

public trainingMenuHandler(id, hMenu, item) {
Expand Down Expand Up @@ -399,7 +396,7 @@ public trainingMenuHandler(id, hMenu, item) {
}

public modeSelectMenu(id) {
if (!is_user_connected(id) || g_iCurrentMode != e_mTraining)
if (!is_user_connected(id) || !getUserInAccess(id) || g_iCurrentMode != e_mTraining)
return;

new hMenu = menu_create("\yChoose game mode", "HandlerSelectMode");
Expand Down
14 changes: 0 additions & 14 deletions scripting/include/hns-match/hook.inc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ stock hook_init() {
RegisterHookChain(RG_CSGameRules_FlPlayerFallDamage, "rgFlPlayerFallDamage", true);
RegisterHookChain(RG_CBasePlayer_Spawn, "rgPlayerSpawn", true);
RegisterHookChain(RG_CBasePlayer_TakeDamage, "rgTakeDamage", true);
RegisterHookChain(RH_SV_DropClient, "rgDropClient", true);
RegisterHookChain(RG_PlayerBlind, "rgPlayerBlind", false);
RegisterHookChain(RG_CBasePlayer_MakeBomber, "rgPlayerMakeBomber", false);
RegisterHookChain(RG_PM_Move, "rgPlayerMovePost", true);
Expand Down Expand Up @@ -342,19 +341,6 @@ public rgTakeDamage(victim, inflictor, attacker, Float:damage, damage_bits) {
}
}

public rgDropClient(const id, bool:crash) {
if (!is_entity(id))
return;

if ((getUserTeam(id) == TEAM_TERRORIST || getUserTeam(id) == TEAM_CT) && (g_iCurrentMode == e_mMatch || g_iCurrentMode == e_mPaused)) {
g_ePlayerInfo[id][e_plrRetryTime] = g_eRoundInfo[id][e_flSurviveTime];
g_ePlayerInfo[id][e_plrRetryGameStops] = g_iGameStops;

client_print_color(0, print_team_blue, "%L", 0, "PLR_DISC", prefix, id);
}
TrieSetArray(g_tPlayerInfo, getUserKey(id), g_ePlayerInfo[id], PlayerInfo_s);
}

public rgPlayerBlind(const index, const inflictor, const attacker, const Float:fadeTime, const Float:fadeHold, const alpha, Float:color[3]) {
if (g_iCurrentMode == e_mMatch) {
if (getUserTeam(index) != getUserTeam(attacker))
Expand Down
70 changes: 13 additions & 57 deletions scripting/include/hns-match/showinfo.inc
Original file line number Diff line number Diff line change
Expand Up @@ -209,63 +209,19 @@ public ShowTop(player) {
}

new szMotd[MAX_MOTD_LENGTH], iLen;
iLen = formatex(szMotd, charsmax(szMotd), "<html>\
<head>\
<meta charset=^"utf-8^"> \
<style type=^"text/css^"> \
table { \
width:600px; \
font-family:Arial, Helvetica, sans-serif; \
color:#666; \
font-size:12px; \
text-shadow: 1px 1px 0px #fff; \
margin:0 auto; \
border:#ccc 1px solid; \
-webkit-box-shadow: 2px 2px 3px -1px rgba(0,0,0,0.35); \
} \
table th { \
padding:21px 25px 22px 25px; \
border-top:1px solid #fafafa; \
border-bottom:1px solid #e0e0e0; \
background: #ededed; \
} \
table th:first-child{ \
text-align: left; \
padding-left:20px; \
} \
table tr{ \
text-align: center; \
padding-left:20px; \
} \
table tr td:first-child{ \
text-align: left; \
padding-left:20px; \
} \
table tr td { \
padding:18px; \
border-top: 1px solid #ffffff; \
border-bottom:1px solid #e0e0e0; \
border-left: 1px solid #e0e0e0; \
background: #fafafa; \
} \
</style> \
</head>\
<body>\
<div>\
<table cellspacing=^"0^">\
<thead>\
<tr>\
<th>Player</th>\
<th>Survive time</th>\
<th>Damaged</th>\
<th>Hide time</th>\
<th>Flashed</th>\
<th>Found TT</th>\
<th>Stabs</th>\
<th>Run</th>\
</tr>\
</thead>\
<tbody>");
iLen = formatex(szMotd, charsmax(szMotd), "<html><head><style> \
table { width:600px } \
table tr{ text-align: center } \
</style></head><body><div><table><thead><tr>\
<th>Player</th>\
<th>Survive time</th>\
<th>Damaged</th>\
<th>Hide time</th>\
<th>Flashed</th>\
<th>Found TT</th>\
<th>Stabs</th>\
<th>Run</th>\
</tr></thead><tbody>");
new szSurvTime[24];
new szTimeFlash[24];
new szHideTime[24];
Expand Down
3 changes: 3 additions & 0 deletions scripting/include/hns-match/user.inc
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ stock setUserGodmode(index, godmode = 0) {
}

stock setUserRole(id) {
if (!is_user_connected(id))
return;

new TeamName:team = getUserTeam(id);
rg_remove_all_items(id);
if (g_iCurrentMode > e_mKnife && g_iCurrentMode != e_mCaptain) {
Expand Down

0 comments on commit b05ff21

Please sign in to comment.