Spring break cleanup.
Cleaning up all useless tabs, spaces, indents, you name it.
This commit is contained in:
@@ -12,27 +12,27 @@ ConVar g_cvarMaximumStreak = null;
|
||||
bool g_bIsMotherZM[MAXPLAYERS+1] = false;
|
||||
int g_iKillStreak[MAXPLAYERS+1] = 0;
|
||||
|
||||
public Plugin myinfo =
|
||||
public Plugin myinfo =
|
||||
{
|
||||
name = "KillStreaks",
|
||||
author = "Neon",
|
||||
name = "KillStreaks",
|
||||
author = "Neon",
|
||||
description = "Recreation of the original HLSTATS Killstreaks for Zombies only + new MotherZM-Win event",
|
||||
version = "1.1",
|
||||
url = "https://steamcommunity.com/id/n3ontm"
|
||||
version = "1.1",
|
||||
url = "https://steamcommunity.com/id/n3ontm"
|
||||
};
|
||||
|
||||
public void OnPluginStart()
|
||||
{
|
||||
{
|
||||
g_cvarMinimumStreak = CreateConVar("sm_killstreaks_min", "2", "amount of kills required for the lowest killstreak", 0, true, 0.0);
|
||||
g_cvarMaximumStreak = CreateConVar("sm_killstreaks_max", "12", "amount of kills required for the highest killstreak", 0, true, 0.0);
|
||||
|
||||
|
||||
HookEvent("round_end", OnRoundEnding, EventHookMode_Pre);
|
||||
HookEvent("player_spawn", OnClientSpawn);
|
||||
HookEvent("player_death", OnClientDeath, EventHookMode_Pre);
|
||||
}
|
||||
|
||||
public void OnMapStart()
|
||||
{
|
||||
{
|
||||
GetTeams();
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public void ZR_OnClientInfected(int client, int attacker, bool motherInfect, boo
|
||||
{
|
||||
if (motherInfect)
|
||||
g_bIsMotherZM[client] = true;
|
||||
|
||||
|
||||
if (attacker > -1)
|
||||
g_iKillStreak[attacker] += 1;
|
||||
}
|
||||
@@ -65,7 +65,7 @@ public void OnClientDeath(Event hEvent, const char[] sEvent, bool bDontBroadcast
|
||||
public void OnRoundEnding(Event hEvent, const char[] sEvent, bool bDontBroadcast)
|
||||
{
|
||||
int iReason = hEvent.GetInt("reason");
|
||||
|
||||
|
||||
if (iReason != view_as<int>(CSRoundEnd_GameStart))
|
||||
{
|
||||
for (int client = 1; client <= MaxClients; client++)
|
||||
@@ -74,9 +74,9 @@ public void OnRoundEnding(Event hEvent, const char[] sEvent, bool bDontBroadcast
|
||||
{
|
||||
if ((ZR_IsClientZombie(client)) && (g_bIsMotherZM[client]))
|
||||
LogPlayerEvent(client, "triggered", "ze_m_zombies_win");
|
||||
|
||||
|
||||
EndKillStreak(client);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -87,10 +87,10 @@ public void EndKillStreak(int client)
|
||||
{
|
||||
if (g_iKillStreak[client] > g_cvarMaximumStreak.IntValue)
|
||||
g_iKillStreak[client] = g_cvarMaximumStreak.IntValue;
|
||||
|
||||
char StrEventName[32];
|
||||
|
||||
char StrEventName[32];
|
||||
if(g_bIsMotherZM[client])
|
||||
{
|
||||
{
|
||||
Format(StrEventName, sizeof(StrEventName), "ze_m_kill_streak_%d", g_iKillStreak[client]);
|
||||
LogPlayerEvent(client, "triggered", StrEventName);
|
||||
}
|
||||
@@ -98,9 +98,9 @@ public void EndKillStreak(int client)
|
||||
{
|
||||
Format(StrEventName, sizeof(StrEventName), "ze_kill_streak_%d", g_iKillStreak[client]);
|
||||
LogPlayerEvent(client, "triggered", StrEventName);
|
||||
}
|
||||
}
|
||||
ResetClient(client);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void ResetClient(int client)
|
||||
|
||||
Reference in New Issue
Block a user