Format everything

This commit is contained in:
zaCade 2019-03-17 15:10:27 +01:00
parent 9a2e8b4eb7
commit 7e10e6f019
16 changed files with 391 additions and 403 deletions

View File

@ -258,21 +258,22 @@ ApplyZombieHealth(client, zombieid)
{ {
if (IsValidZombieID(zombieid)) if (IsValidZombieID(zombieid))
{ {
new iCount = 0; new iClientCount = 0;
for (new i = 1; i <= MaxClients; i++) for (new i = 1; i <= MaxClients; i++)
{ {
if (IsValidClient(i) && (GetClientTeam(i) == 3) && IsPlayerAlive(i)) if (IsClientInGame(i) && IsPlayerAlive(i) && GetClientTeam(i) == CS_TEAM_CT)
{ {
iCount++; iClientCount++;
} }
} }
if (iCount == 0)
{
iCount++;
}
SetEntityHealth(client, arrayZombies[zombieid][data_health]*iCount); if (iClientCount == 0)
{
iClientCount++;
}
SetEntityHealth(client, arrayZombies[zombieid][data_health] * iClientCount);
} }
} }
@ -309,16 +310,3 @@ ApplyZombieFOV(client, zombieid)
SetPlayerFOV(client, arrayZombies[zombieid][data_fov]); SetPlayerFOV(client, arrayZombies[zombieid][data_fov]);
} }
} }
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
int:IsValidClient(client, nobots = true)
{
if (client <= 0 || client > MaxClients || !IsClientConnected(client) || (nobots && IsFakeClient(client)))
{
return false;
}
return IsClientInGame(client);
}