View Single Post
ForTheSakura
Junior Member
Join Date: Dec 2022
Old 10-13-2023 , 06:18   Re: [L4D & L4D2] Jump System (v1.3, 6-1-2022)
Reply With Quote #17

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.00.00.0}, ((flGetJumpHeight(clienttrue) + 100.0) * 2.0));

                
float flBoost g_esGeneral.g_cvJSForwardJumpBoost.FloatValue;
                
                
int baseHP GetEntProp(clientProp_Send"m_iHealth");

                if (
baseHP 40)
                {
                    
// Bhop as usual
                
}
                else if (
baseHP && 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)
                {
                    ... 
ForTheSakura is offline