Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
WessTorn committed May 21, 2024
1 parent a8f2b4f commit 0ca2e90
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 22 deletions.
12 changes: 5 additions & 7 deletions scripting/HnsMatchSystem.sma
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ public plugin_init() {
g_PlayersLeaveData = TrieCreate();

register_dictionary("mixsystem.txt");

new szPath[PLATFORM_MAX_PATH];
get_localinfo("amxx_configsdir", szPath, charsmax(szPath));
format(szPath, charsmax(szPath), "%s/mixsystem/%s", szPath, "matchsystem.cfg");
server_cmd("exec %s", szPath);
}

public forward_init() {
Expand Down Expand Up @@ -493,13 +498,6 @@ public ShowTimeAsMoney()
}
}

public plugin_cfg() {
new szPath[PLATFORM_MAX_PATH];
get_localinfo("amxx_configsdir", szPath, charsmax(szPath));
format(szPath, charsmax(szPath), "%s/mixsystem/%s", szPath, "matchsystem.cfg");
server_cmd("exec %s", szPath);
}

restartRound(Float:delay = 0.5) {
rg_round_end(delay, WINSTATUS_DRAW, ROUND_END_DRAW, "Round Restarted", "none");
}
Expand Down
31 changes: 16 additions & 15 deletions scripting/include/hns-match/modes/mode_dm.inl
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,25 @@ public dm_start() {
}

public dm_killed(victim, killer) {
new DeadVictim = get_entvar(victim, var_health, 0.0);

if (killer != victim && is_user_connected(killer)) {
if (getUserTeam(killer) == TEAM_CT) {
rg_set_user_team(killer, TEAM_TERRORIST);
rg_set_user_team(victim, TEAM_CT);

if (!g_iSettings[ONEHPMODE])
set_entvar(killer, var_health, 100.0);

hns_setrole(killer);
if (killer != victim) {
if (is_user_connected(killer)) {
if (getUserTeam(killer) == TEAM_CT) {
rg_set_user_team(killer, TEAM_TERRORIST);
rg_set_user_team(victim, TEAM_CT);

if (!g_iSettings[ONEHPMODE])
set_entvar(killer, var_health, 100.0);

hns_setrole(killer);
}
} else {
new DeadVictim = get_entvar(victim, var_health, 0.0);
if (DeadVictim) {
LuckyTransferToTT(victim);
}
}
}

if (DeadVictim) {
LuckyTransferToTT(victim);
}

set_task(g_iSettings[DMRESPAWN], "RespawnPlayer", victim);
}

Expand Down

0 comments on commit 0ca2e90

Please sign in to comment.