Skip to content

Commit

Permalink
v1.1.6 fix: showinfo (top), alltalk
Browse files Browse the repository at this point in the history
  • Loading branch information
WessTorn committed Apr 24, 2021
1 parent ede4065 commit 605689b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
7 changes: 4 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.5", "??"); // Спасибо: Cultura, Garey, Medusa, Ruffman, Conor
register_plugin("Hide'n'Seek Match System", "1.1.6", "??"); // Спасибо: Cultura, Garey, Medusa, Ruffman, Conor

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

Expand All @@ -24,7 +24,7 @@ public plugin_init() {
g_eCvars[e_cSurVoteTime] = register_cvar("hns_survotetime", "10", FCVAR_ARCHIVE | FCVAR_SERVER);
g_eCvars[e_cCheckPlayNoPlay] = register_cvar("hns_checkplay", "1", FCVAR_ARCHIVE | FCVAR_SERVER);
g_eCvars[e_cGameName] = register_cvar("hns_gamename", "Hide'n'Seek");
get_pcvar_string(register_cvar("hns_knifemap", "32hp_2", FCVAR_ARCHIVE | FCVAR_SERVER), g_eCvars[e_cKnifeMap], 24)
get_pcvar_string(register_cvar("hns_knifemap", "35hp_2", FCVAR_ARCHIVE | FCVAR_SERVER), g_eCvars[e_cKnifeMap], 24)

hookOnOff_init();
cmds_init();
Expand Down Expand Up @@ -218,6 +218,8 @@ public taskPrepareMode(mode) {

fnConvertTime(get_pcvar_float(g_eCvars[e_cCapTime]) * 60.0, g_eMatchInfo[e_mWinTime], charsmax(g_eMatchInfo[e_mWinTime]));
rg_send_audio(0, "sound/barney/ba_bring.wav");

addStats();
}
case e_mPublic: {
g_iCurrentMode = e_mPublic;
Expand All @@ -241,7 +243,6 @@ public taskPrepareMode(mode) {
}
}
restartRound();
addStats();
}

restartRound(Float:delay = 0.5) {
Expand Down
7 changes: 5 additions & 2 deletions scripting/include/hns-match/cmds.inc
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,8 @@ public cmdStartPause(id) {
client_print_color(0, print_team_blue, "%L", id, "GAME_PAUSED", prefix, getUserName(id));
}

rg_send_audio(0, "fvox/activated.wav");
rg_send_audio(0, "fvox/deactivated.wav");
server_cmd("sv_alltalk 1"); // Переделать!
disableSemiclip();
}
return PLUGIN_HANDLED;
Expand All @@ -496,7 +497,7 @@ public cmdStopPause(id) {
client_print_color(0, print_team_blue, "%L", id, "GAME_UNPAUSED", prefix, getUserName(id));
}

rg_send_audio(0, "fvox/deactivated.wav");
rg_send_audio(0, "fvox/activated.wav");
g_bGameStarted = true;

setTaskHud(0, 1.0, 1, 255, 255, 0, 3.0, "Game Unpause^nLive Live Live");
Expand All @@ -513,6 +514,8 @@ public cmdStopPause(id) {
}
loadMapCFG();
}

server_cmd("sv_alltalk 3"); // Переделать!
return PLUGIN_HANDLED;
}

Expand Down
2 changes: 1 addition & 1 deletion scripting/include/hns-match/hook.inc
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ public rgPlayerSpawn(id) {

public rgTakeDamage(victim, inflictor, attacker, Float:damage, damage_bits) {
if (g_iCurrentMode == e_mMatch) {
if (is_user_connected(attacker) && 1 <= attacker <= MAX_PLAYERS && getUserTeam(victim) != getUserTeam(attacker)) {
if (is_user_connected(attacker) && getUserTeam(victim) != getUserTeam(attacker)) {
statsStabs(attacker);
}
} else if (g_iCurrentMode == e_mTraining) {
Expand Down
4 changes: 1 addition & 3 deletions scripting/include/hns-match/showinfo.inc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ stock statsFlashedTime(attacker, Float:fadeHold) {
}

stock statsStabs(attacker) {
g_eRoundInfo[attacker][e_iStabs]++;
iStats[attacker][e_iStabs]++;
}

stock lastOrigin(id) {
Expand Down Expand Up @@ -98,7 +98,6 @@ public apply_stats() {
iStats[id][e_flFlashedTime] += g_eRoundInfo[id][e_flFlashedTime];
iStats[id][e_flHideTime] += g_eRoundInfo[id][e_flHideTime];
iStats[id][e_iFound] += g_eRoundInfo[id][e_iFound];
iStats[id][e_iStabs] += g_eRoundInfo[id][e_iStabs];
arrayset(g_eRoundInfo[id], 0, RoundInfo_s);
}

Expand All @@ -110,7 +109,6 @@ public apply_stats() {
iStats[id][e_flFlashedTime] += g_eRoundInfo[id][e_flFlashedTime];
iStats[id][e_flHideTime] += g_eRoundInfo[id][e_flHideTime];
iStats[id][e_iFound] += g_eRoundInfo[id][e_iFound];
iStats[id][e_iStabs] += g_eRoundInfo[id][e_iStabs];
arrayset(g_eRoundInfo[id], 0, RoundInfo_s);
}
}
Expand Down

0 comments on commit 605689b

Please sign in to comment.