bandaid fix: make zm hp scale

This commit is contained in:
neon 2019-03-17 14:36:21 +01:00
parent df52c16f25
commit 9a2e8b4eb7

View File

@ -258,7 +258,21 @@ ApplyZombieHealth(client, zombieid)
{
if (IsValidZombieID(zombieid))
{
SetEntityHealth(client, arrayZombies[zombieid][data_health]);
new iCount = 0;
for (new i = 1; i <= MaxClients; i++)
{
if (IsValidClient(i) && (GetClientTeam(i) == 3) && IsPlayerAlive(i))
{
iCount++;
}
}
if (iCount == 0)
{
iCount++;
}
SetEntityHealth(client, arrayZombies[zombieid][data_health]*iCount);
}
}
@ -295,3 +309,16 @@ ApplyZombieFOV(client, zombieid)
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);
}