checking if health perk from smrpg is active

This commit is contained in:
jenz 2024-02-22 22:52:22 +01:00
parent c26c9255e1
commit a14df3e10d

View File

@ -13,6 +13,9 @@
#include <clientprefs>
#include <smlib>
//smrpg not letting health be overwritten by zr classes
#tryinclude <smrpg_health>
#pragma newdecls required
//#pragma dynamic 131072
char g_cDaysTitles[100][512];
@ -1739,10 +1742,16 @@ public Action Timer_SetSpeed(Handle timer, any userid)
SetEntityHealth(client, StringToInt(g_cHealth[g_iSpeedDelayClient[client]][g_iLength]) + (additional_zombie_health_per_player * l_iPlayers));
}
else if (CS_TEAM_CT == GetClientTeam(client))
{
// smrpg
//checking if the health perk is used by the player, this basically makes the hp setting in the config useless most of the time.
//but looks like people just anyways will want CT to always have 100 HP.
if (SMRPG_Health_GetClientMaxHealth(client) == 100)
{
SetEntityHealth(client, StringToInt(g_cHealth[g_iSpeedDelayClient[client]][g_iLength]));
}
}
}
return Plugin_Handled;
}
//----------------------------------------------------------------------------------------------------