added gamescore points and hlstats points for zone takeover

This commit is contained in:
jenz 2023-11-13 14:59:45 +01:00
parent a378487b93
commit 2d1ae71634

View File

@ -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);
}
}
}