From 52bdb160271bcfd0eb00d602d32e247aa6c04960 Mon Sep 17 00:00:00 2001 From: WessTorn Date: Thu, 10 Jun 2021 06:47:46 +0300 Subject: [PATCH] v1.1.8.8 fix --- data/lang/mixsystem.txt | 1 + scripting/HnsMatchSystem.sma | 19 ++++++++----------- scripting/include/hns-match/forward.inc | 2 +- scripting/include/hns-match/hook.inc | 6 +++--- scripting/include/hns-match/user.inc | 2 +- 5 files changed, 14 insertions(+), 16 deletions(-) diff --git a/data/lang/mixsystem.txt b/data/lang/mixsystem.txt index 510803f..3b38d3f 100644 --- a/data/lang/mixsystem.txt +++ b/data/lang/mixsystem.txt @@ -9,6 +9,7 @@ SET_MAXROUNDS = %s ^3%s ^1 set ^3maxrounds^1 to ^3%d^1 rounds. 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! diff --git a/scripting/HnsMatchSystem.sma b/scripting/HnsMatchSystem.sma index 9a9aa96..b3b9fff 100644 --- a/scripting/HnsMatchSystem.sma +++ b/scripting/HnsMatchSystem.sma @@ -7,7 +7,7 @@ public plugin_precache() { } public plugin_init() { - register_plugin("Hide'n'Seek Match System", "1.1.8.7", "??"); // Спасибо: Cultura, Garey, Medusa, Ruffman, Conor + register_plugin("Hide'n'Seek Match System", "1.1.8.8", "??"); // Спасибо: Cultura, Garey, Medusa, Ruffman, Conor get_mapname(g_eMatchInfo[e_mMapName], charsmax(g_eMatchInfo[e_mMapName])); @@ -65,20 +65,17 @@ public taskDelayedMode() { taskPrepareMode(e_mTraining); } - if(get_pcvar_num(g_eCvars[e_cRules]) == 1) - { + if(get_pcvar_num(g_eCvars[e_cRules]) == 1) { g_iCurrentRules = e_mMR; - } - else - { + } else { g_iCurrentRules = e_mTimer; } } public registerMode() { g_iHostageEnt = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "hostage_entity")); - set_entvar(g_iHostageEnt, var_origin, Float:{ 0.0, 0.0, -55000.0 }); - set_entvar(g_iHostageEnt, var_size, Float:{ -1.0, -1.0, -1.0 }, Float:{ 1.0, 1.0, 1.0 }); + set_pev(g_iHostageEnt, pev_origin, Float:{ 0.0, 0.0, -55000.0 }); + set_pev(g_iHostageEnt, pev_size, Float:{ -1.0, -1.0, -1.0 }, Float:{ 1.0, 1.0, 1.0 }); dllfunc(DLLFunc_Spawn, g_iHostageEnt); } @@ -230,7 +227,7 @@ public taskPrepareMode(mode) { loadMapCFG(); new iPlayers[MAX_PLAYERS], iNum; - get_players(iPlayers, iNum, "e", "TERRORIST"); + get_players(iPlayers, iNum, "ce", "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])); @@ -272,7 +269,7 @@ public plugin_cfg() { restartRound(Float:delay = 0.5) { if (g_bSurvival) { new iPlayers[32], iNum; - get_players(iPlayers, iNum); + get_players(iPlayers, iNum, "c"); g_flSidesTime[g_iCurrentSW] -= g_flRoundTime; @@ -338,4 +335,4 @@ disableSemiclip() { server_cmd("semiclip_option time 0"); } -// Спасибо: Cultura, Garey, Medusa, Ruffman, Conor \ No newline at end of file +// Спасибо: Cultura, Garey, Medusa, Ruffman, Conor diff --git a/scripting/include/hns-match/forward.inc b/scripting/include/hns-match/forward.inc index c34ac0f..95d9df2 100644 --- a/scripting/include/hns-match/forward.inc +++ b/scripting/include/hns-match/forward.inc @@ -73,7 +73,7 @@ public fwdGameNameDesc() { public fwdClientKill(id) { if (g_iCurrentMode == e_mDM) { - client_print_color(0, print_team_blue, "%s Kill during deathmatch is not available.", hns_tag); + client_print_color(0, print_team_blue, "%L", id, "KILL_NOT", prefix); return FMRES_SUPERCEDE; } else { client_print_color(0, print_team_blue, "%L", id, "KILL_HIMSELF", prefix, getUserName(id)); diff --git a/scripting/include/hns-match/hook.inc b/scripting/include/hns-match/hook.inc index 48abd14..5c3ab2a 100644 --- a/scripting/include/hns-match/hook.inc +++ b/scripting/include/hns-match/hook.inc @@ -51,7 +51,7 @@ public rgRoundEnd(WinStatus:status, ScenarioEventEndRound:event, Float:tmDelay) if (g_iCurrentRules == e_mMR) { if (status == WINSTATUS_TERRORISTS) { new players[MAX_PLAYERS], pnum; - get_players(players, pnum, "ae", "CT"); + get_players(players, pnum, "ace", "CT"); if (!pnum) { new Float:roundtime = get_pcvar_float(g_eCvars[e_cRoundTime]) * 60.0; g_flSidesTime[g_iCurrentSW] += roundtime - g_flRoundTime; @@ -225,14 +225,14 @@ public rgOnRoundFreezeEnd() { public rgFlPlayerFallDamage(id) { if (g_iCurrentMode == e_mMatch) { - statsDmg(id); + statsDmg(id); } } public taskRoundEvent() { if (g_bSurvival) { new iPlayers[32], count; - get_players(iPlayers, count, "he", "TERRORIST"); + get_players(iPlayers, count, "che", "TERRORIST"); for(new i; i < 10; i++) { g_iBestAuth[i] = ""; diff --git a/scripting/include/hns-match/user.inc b/scripting/include/hns-match/user.inc index b273b62..334c25d 100644 --- a/scripting/include/hns-match/user.inc +++ b/scripting/include/hns-match/user.inc @@ -25,7 +25,7 @@ stock bool:getUserInMatch(id) { return false; new iPlayers[MAX_PLAYERS], iNum; - get_players(iPlayers, iNum, "h"); + get_players(iPlayers, iNum, "ch"); for (new i; i < iNum; i++) { new iPlayer = iPlayers[i];