Hi, can you add conditions to slow down bhopping when a player's health is below 40, and completely block it when their health is at 1?
PHP Code:
...
if (iHop == 1)
{
vPushPlayer(client, {-90.0, 0.0, 0.0}, ((flGetJumpHeight(client, true) + 100.0) * 2.0));
float flBoost = g_esGeneral.g_cvJSForwardJumpBoost.FloatValue;
int baseHP = GetEntProp(client, Prop_Send, "m_iHealth");
if (baseHP > 40)
{
// Bhop as usual
}
else if (baseHP > 1 && baseHP < 40)
{
// Only jump in place without gaining speed
}
else if (baseHP == 1)
{
// No bhop, also useful for when black and white
}
if (flBoost > 0.0)
{
...