From 2d1ae7163416cf3048e47c0e394bec63dfff6797 Mon Sep 17 00:00:00 2001 From: jenz Date: Mon, 13 Nov 2023 14:59:45 +0100 Subject: [PATCH] added gamescore points and hlstats points for zone takeover --- zombie_hunting_respawn/zh_respawn_stop.sp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/zombie_hunting_respawn/zh_respawn_stop.sp b/zombie_hunting_respawn/zh_respawn_stop.sp index f39ddf5b..a864e392 100644 --- a/zombie_hunting_respawn/zh_respawn_stop.sp +++ b/zombie_hunting_respawn/zh_respawn_stop.sp @@ -28,7 +28,6 @@ float g_fEndPos[MAXZONES][3]; ConVar g_hRespawnTreshold; ConVar g_hHealthRegenZM; ConVar g_hHealthRegenAmount; -ConVar g_hZMSpeedBuff; Handle hText; Handle g_hZMZoneTimer = null; @@ -53,7 +52,6 @@ public void OnPluginStart() g_hRespawnTreshold = CreateConVar("zh_respawn_count", "5.0", "zombie hunting respawn count", 0, true, 0.0, true, 100.0); g_hHealthRegenZM = CreateConVar("zh_regenMaxHealth", "2000", "zombie hunting zombie max health for regen", 0, true, 0.0, true, 5000.0); g_hHealthRegenAmount = CreateConVar("zh_regenAmount", "100", "zombie hunting zombie max health for regen", 0, true, 0.0, true, 5000.0); - g_hZMSpeedBuff = CreateConVar("zh_speedbuff", "1.2", "zombie hunting zombie speed buff in zm zone", 0, true, 0.0, true, 5000.0); for (int client; client < MaxClients; client++) g_bBlockRespawn[client] = 0; @@ -196,8 +194,6 @@ public void OnClientDeath(Event hEvent, const char[] sEvent, bool bDontBroadcast g_client_in_zone[victim] = -1; adjust_clients(); SetEntityRenderColor(victim, 255, 255, 255, 255); - //resetting speed to default althought its only needed for ZM to be enforced - SetEntPropFloat(victim, Prop_Data, "m_flLaggedMovementValue", 1.0); if (g_bBlockRespawn[victim] > g_hRespawnTreshold.IntValue) return; PrintToChat(victim, "\x04[ZR]\x01 You have %i respawns left for this round.", g_hRespawnTreshold.IntValue - g_bBlockRespawn[victim]); @@ -348,8 +344,6 @@ public void unloze_zoneLeave(int client, char[] zone) } } SetEntityRenderColor(client, 255, 255, 255, 255); - //resetting speed to default althought its only needed for ZM to be enforced - SetEntPropFloat(client, Prop_Data, "m_flLaggedMovementValue", 1.0); UpdateMarkers(); } @@ -457,7 +451,6 @@ public void display_hud_text(int index, int client) SetHudTextParams(0.35, 0.85, 2.5, 255, 0, 0, 85); ShowSyncHudText(client, hText, msg); SetEntityRenderColor(client, 255, 0, 0, 255); - SetEntPropFloat(client, Prop_Data, "m_flLaggedMovementValue", g_hZMSpeedBuff.FloatValue); } } } @@ -891,6 +884,7 @@ public void UpdateMarkers() } } +//change to points for zone taker over simply, add gamescore +5 points for zone takeover. public void reward_ct_zone_points(int i) { for (int j = 0; j < MaxClients; j++) @@ -929,6 +923,9 @@ public void reward_ct_zone_points(int i) { LH_LogPlayerEvent(j, "triggered", "zh_h_zone_take_over_6", false); } + int frags = GetClientFrags(j); + SetEntProp(j, Prop_Data, "m_iFrags", frags + 5); + LH_LogPlayerEvent(j, "triggered", "zh_h_zone_take_over_simple", false); } } }