diff --git a/ZombieRiot/scripting/unloze_zr.sp b/ZombieRiot/scripting/unloze_zr.sp index 2bd987d9..7bbbc880 100644 --- a/ZombieRiot/scripting/unloze_zr.sp +++ b/ZombieRiot/scripting/unloze_zr.sp @@ -13,6 +13,9 @@ #include #include +//smrpg not letting health be overwritten by zr classes +#tryinclude + #pragma newdecls required //#pragma dynamic 131072 char g_cDaysTitles[100][512]; @@ -1740,7 +1743,13 @@ public Action Timer_SetSpeed(Handle timer, any userid) } else if (CS_TEAM_CT == GetClientTeam(client)) { - SetEntityHealth(client, StringToInt(g_cHealth[g_iSpeedDelayClient[client]][g_iLength])); + // 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;