Spring break cleanup.

Cleaning up all useless tabs, spaces, indents, you name it.
This commit is contained in:
zaCade
2018-07-23 17:06:03 +02:00
parent 0e8490f32f
commit c8b3433700
17 changed files with 925 additions and 962 deletions
+44 -70
View File
@@ -2,110 +2,84 @@
#include <cstrike>
#include <zombiereloaded>
new bool:G_bIsHuman[66];
new bool:G_bIsZombie[66];
new bool:G_bIsHuman[MAXPLAYERS+1];
new bool:G_bIsZombie[MAXPLAYERS+1];
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public Plugin myinfo =
{
name = "MVP_Stars",
author = "zaCade",
description = "",
version = "1.0",
url = ""
name = "MVP_Stars",
author = "zaCade",
description = "",
version = "1.0",
url = ""
};
public void OnPluginStart()
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public OnPluginStart()
{
HookEvent("round_start", Event_RoundStart, EventHookMode:1);
HookEvent("round_end", Event_RoundEnd, EventHookMode:1);
HookEvent("round_start", Event_RoundStart);
HookEvent("round_end", Event_RoundEnd);
}
public void ZR_OnClientInfected(int client, int attacker, bool motherInfect, bool respawnOverride, bool respawn)
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public ZR_OnClientInfected(client, attacker, bool:motherinfect, bool:respawnoverride, bool:respawn)
{
G_bIsHuman[client] = 0;
G_bIsZombie[client] = 1;
G_bIsHuman[client] = false;
G_bIsZombie[client] = true;
}
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public ZR_OnClientHumanPost(client, bool:respawn, bool:protect)
{
G_bIsHuman[client] = 1;
G_bIsZombie[client] = 0;
G_bIsHuman[client] = true;
G_bIsZombie[client] = false;
}
public Action:Event_RoundStart(Handle:event, String:name[], bool:dontBroadcast)
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = 1;
while (client <= MaxClients)
for (new client = 1; client <= MaxClients; client++)
{
G_bIsHuman[client] = 1;
G_bIsZombie[client] = 0;
client++;
G_bIsHuman[client] = true;
G_bIsZombie[client] = false;
}
return Action:0;
}
public Action:Event_RoundEnd(Handle:event, String:name[], bool:dontBroadcast)
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public Action:Event_RoundEnd(Handle:event, const String:name[], bool:dontBroadcast)
{
switch (GetEventInt(event, "winner"))
switch(GetEventInt(event, "winner"))
{
case 2:
{
CreateTimer(0.2, OnZombiesWin, any:0, 2);
}
case 3:
{
CreateTimer(0.2, OnHumansWin, any:0, 2);
}
default:
{
}
case(CS_TEAM_CT): CreateTimer(0.2, OnHumansWin, INVALID_HANDLE, TIMER_FLAG_NO_MAPCHANGE);
}
return Action:0;
}
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public Action:OnHumansWin(Handle:timer)
{
new client = 1;
while (client <= MaxClients)
for (new client = 1; client <= MaxClients; client++)
{
new var1;
if (IsClientInGame(client) && IsPlayerAlive(client) && !IsClientObserver(client) && !IsFakeClient(client))
{
new var2;
if (G_bIsHuman[client] && !G_bIsZombie[client])
{
CS_SetMVPCount(client, CS_GetMVPCount(client) + 1);
new String:sAuthID[64];
if (!GetClientAuthString(client, sAuthID, 64, true))
{
Format(sAuthID, 64, "UNKNOWN");
}
}
}
client++;
}
return Action:0;
}
public Action:OnZombiesWin(Handle:timer)
{
new client = 1;
while (client <= MaxClients)
{
new var1;
if (IsClientInGame(client) && IsPlayerAlive(client) && !IsClientObserver(client) && !IsFakeClient(client))
{
new var2;
if (G_bIsZombie[client] && !G_bIsHuman[client])
{
new String:sAuthID[64];
if (!GetClientAuthString(client, sAuthID, 64, true))
{
Format(sAuthID, 64, "UNKNOWN");
}
}
}
client++;
}
return Action:0;
}