Raised This Month: $12 Target: $400
 3% 

Bunny Hop


Post New Thread Reply   
 
Thread Tools Display Modes
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 06-12-2020 , 09:23   Re: Bunny Hop
Reply With Quote #11

The speed on cstrike is 320.0. When bunny hopping it increases to over 600.0. What is that laser plugin you are using in video?

Quote:
Originally Posted by Repsol View Post
I want the bunny hop plugin but with the feature I want

I want my speed not to slow down when I go back in bunny jump at high speed

video:

https://www.youtube.com/watch?v=9A_P...ature=youtu.be

I am currently using this plugin but it does not meet my requirements
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <hamsandwich>

#define PLUGIN    "Bhop Abilities"
#define VERSION "0.5.2"
#define AUTHOR    "ConnorMcLeod"

#define MAX_PLAYERS    32

#define OFFSET_CAN_LONGJUMP    356 // VEN
#define BUNNYJUMP_MAX_SPEED_FACTOR 1.7

#define PLAYER_JUMP        6

new g_iCdWaterJumpTime[MAX_PLAYERS+1]
new 
bool:g_bAlive[MAX_PLAYERS+1]
new 
bool:g_bAutoBhop[MAX_PLAYERS+1]

new 
g_pcvarBhopStyleg_pcvarAutoBhopg_pcvarFallDamage
new g_pcvarGravity

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
register_cvar("bhop_abilities"VERSIONFCVAR_SERVER|FCVAR_EXTDLL|FCVAR_SPONLY)
    
g_pcvarBhopStyle register_cvar("bhop_style""2")  // (1 : no slowdown, 2 : no speed limit)
    
g_pcvarAutoBhop register_cvar("bhop_auto""1")
    
g_pcvarFallDamage register_cvar("mp_falldamage""1.0")

    
RegisterHam(Ham_Player_Jump"player""Player_Jump")
    
register_forward(FM_UpdateClientData"UpdateClientData")
    
register_forward(FM_CmdStart"CmdStart")
    
RegisterHam(Ham_Spawn"player""Check_Alive"1)
    
RegisterHam(Ham_Killed"player""Check_Alive"1)
    
RegisterHam(Ham_TakeDamage"player""Ham_TakeDamage_player")

    
register_concmd("amx_autobhop""AdminCmd_Bhop"ADMIN_LEVEL_A"<nick|#userid> <0|1>")

    
g_pcvarGravity get_cvar_pointer("sv_gravity")
}

public 
Check_Alive(id)
{
    
g_bAlive[id] = bool:is_user_alive(id)
}

public 
Ham_TakeDamage_player(identidattackerFloat:damagedamagebits)
{
    if( 
damagebits != DMG_FALL )
        return 
HAM_IGNORED

    damage 
*= get_pcvar_float(g_pcvarFallDamage)
    
SetHamParamFloat(4damage)

    return 
HAM_HANDLED
}

public 
CmdStart(iduc_handleseed)
{
    if(    
g_bAlive[id]
    &&    
get_pcvar_num(g_pcvarBhopStyle)
    &&    
get_uc(uc_handleUC_Buttons) & IN_USE
    
&&    pev(idpev_flags) & FL_ONGROUND    )
    {
        static 
Float:fVelocity[3]
        
pev(idpev_velocityfVelocity)
        
fVelocity[0] *= 0.3
        fVelocity
[1] *= 0.3
        fVelocity
[2] *= 0.3
        set_pev
(idpev_velocityfVelocity)
    }
}

public 
Player_Jump(id)
{
    if( !
g_bAlive[id] )
    {
        return
    }
    
    static 
iBhopStyle iBhopStyle get_pcvar_num(g_pcvarBhopStyle)
    if(!
iBhopStyle)
    {
        static 
iOldButtons iOldButtons pev(idpev_oldbuttons)
        if( (
get_pcvar_num(g_pcvarAutoBhop) || g_bAutoBhop[id]) && iOldButtons IN_JUMP && pev(idpev_flags) & FL_ONGROUND)
        {
            
iOldButtons &= ~IN_JUMP
            set_pev
(idpev_oldbuttonsiOldButtons)
            
set_pev(idpev_gaitsequencePLAYER_JUMP)
            
set_pev(idpev_frame0.0)
            return
        }
        return
    }

    if( 
g_iCdWaterJumpTime[id] )
    {
        
//client_print(id, print_center, "Water Jump !!!")
        
return
    }

    if( 
pev(idpev_waterlevel) >= )
    {
        return
    }

    static 
iFlags iFlags pev(idpev_flags)
    if( !(
iFlags FL_ONGROUND) )
    {
        return
    }

    static 
iOldButtons iOldButtons pev(idpev_oldbuttons)
    if( !
get_pcvar_num(g_pcvarAutoBhop) && !g_bAutoBhop[id] && iOldButtons IN_JUMP )
    {
        return
    }

    
// prevent the game from making the player jump
    // as supercede this forward just fails
    
set_pev(idpev_oldbuttonsiOldButtons IN_JUMP)

    static 
Float:fVelocity[3]
    
pev(idpev_velocityfVelocity)

    if(
iBhopStyle == 1)
    {
        static 
Float:fMaxScaledSpeed
        pev
(idpev_maxspeedfMaxScaledSpeed)
        if(
fMaxScaledSpeed 0.0)
        {
            
fMaxScaledSpeed *= BUNNYJUMP_MAX_SPEED_FACTOR
            
static Float:fSpeed
            fSpeed 
floatsqroot(fVelocity[0]*fVelocity[0] + fVelocity[1]*fVelocity[1] + fVelocity[2]*fVelocity[2])
            if(
fSpeed fMaxScaledSpeed)
            {
                static 
Float:fFraction
                fFraction 
= ( fMaxScaledSpeed fSpeed ) * 0.65
                fVelocity
[0] *= fFraction
                fVelocity
[1] *= fFraction
                fVelocity
[2] *= fFraction
            
}
        }
    }

    static 
Float:fFrameTimeFloat:fPlayerGravity
    global_get
(glb_frametimefFrameTime)
    
pev(idpev_gravityfPlayerGravity)

    new 
iLJ
    
if(    (pev(idpev_bInDuck) || iFlags FL_DUCKING)
    &&    
get_pdata_int(idOFFSET_CAN_LONGJUMP)
    &&    
pev(idpev_button) & IN_DUCK
    
&&    pev(idpev_flDuckTime)    )
    {
        static 
Float:fPunchAngle[3], Float:fForward[3]
        
pev(idpev_punchanglefPunchAngle)
        
fPunchAngle[0] = -5.0
        set_pev
(idpev_punchanglefPunchAngle)
        
global_get(glb_v_forwardfForward)

        
fVelocity[0] = fForward[0] * 560
        fVelocity
[1] = fForward[1] * 560
        fVelocity
[2] = 299.33259094191531084669989858532
        iLJ 
1
    
}
    else
    {
        
fVelocity[2] = 268.32815729997476356910084024775
    
}

    
fVelocity[2] -= fPlayerGravity fFrameTime 0.5 get_pcvar_num(g_pcvarGravity)

    
set_pev(idpev_velocityfVelocity)

    
set_pev(idpev_gaitsequencePLAYER_JUMP+iLJ)
    
set_pev(idpev_frame0.0)
}

public 
UpdateClientData(idsendweaponscd_handle)
{
    
g_iCdWaterJumpTime[id] = get_cd(cd_handleCD_WaterJumpTime)
}

public 
AdminCmd_Bhop(idlevelcid)
{
    if(!
cmd_access(idlevelcid2) )
    {
        return 
PLUGIN_HANDLED
    
}

    new 
szPlayer[32]
    
read_argv(1szPlayer31)
    new 
iPlayer cmd_target(idszPlayerCMDTARGET_OBEY_IMMUNITY CMDTARGET_ALLOW_SELF CMDTARGET_NO_BOTS)

    if( !
iPlayer )
    {
        return 
PLUGIN_HANDLED
    
}

    if( 
read_argc() < )
    {
        
g_bAutoBhop[iPlayer] = !g_bAutoBhop[iPlayer]
    }
    else
    {
        new 
arg2[2]
        
read_argv(2arg21)
        if(
arg2[0] == '1' && !g_bAutoBhop[iPlayer])
        {
            
g_bAutoBhop[iPlayer] = true
        
}
        else if(
arg2[0] == '0' && g_bAutoBhop[iPlayer])
        {
            
g_bAutoBhop[iPlayer] = false
        
}
    }

    
client_print(idprint_console"Player %s autobhop is currently : %s"szPlayerg_bAutoBhop[iPlayer] ? "On" "Off")
    return 
PLUGIN_HANDLED

__________________
DJEarthQuake is offline
Repsol
Junior Member
Join Date: Jun 2020
Old 06-12-2020 , 10:05   Re: Bunny Hop
Reply With Quote #12

Quote:
Originally Posted by DJEarthQuake View Post
What is that laser plugin you are using in video?
I was on someone else's server and I took a video

I don't have that plugin and I'm asking for your help
Repsol is offline
Old 06-12-2020, 15:13
alferd
This message has been deleted by alferd.
Repsol
Junior Member
Join Date: Jun 2020
Old 06-12-2020 , 15:14   Re: Bunny Hop
Reply With Quote #13

Quote:
Originally Posted by DJEarthQuake View Post
The speed on cstrike is 320.0
Should I use the "cs_maxspeed_aip.amxx" plugin?
Repsol is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 06-13-2020 , 09:53   Re: Bunny Hop
Reply With Quote #14

@Repsol. This should be to your spec without multiple plugins. Once player bhops they can continue to run at faster than normal speed in Half-Life but Cstrike is built differently. If player stops it sets it back to normal until they activate it again by the bhop.

Code:
#include <amxmodx> #include <amxmisc> #include <fakemeta> #include <fun> #include <hamsandwich> #define PLUGIN  "Bhop Abilities" #define VERSION "0.5.3" #define AUTHOR  "SPiNX" //original < 0.5.3 by ConnorMcLeod //What's different? Optimized playability. Continued runs. #define URL     "Alliedmodders.net" #define MAX_PLAYERS    32 #define OFFSET_CAN_LONGJUMP    356 // VEN #define BUNNYJUMP_MAX_SPEED_FACTOR 1.7 #define PLAYER_JUMP        6 new g_iCdWaterJumpTime[MAX_PLAYERS+1] new bool:g_bAlive[MAX_PLAYERS+1] new bool:g_bAutoBhop[MAX_PLAYERS+1] new g_pcvarBhopStyle, g_pcvarAutoBhop, g_pcvarFallDamage new g_pcvarGravity new bool:cool_down_active public plugin_init() {     #if AMXX_VERSION_NUM != 110;     register_plugin(PLUGIN, VERSION, AUTHOR)     #else     register_plugin(PLUGIN, VERSION, AUTHOR, URL)     #endif     register_cvar("bhop_abilities", VERSION, FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_SPONLY)     g_pcvarBhopStyle = register_cvar("bhop_style", "2")  // (1 : no slowdown, 2 : no speed limit)     g_pcvarAutoBhop = register_cvar("bhop_auto", "1")     g_pcvarFallDamage = register_cvar("mp_falldamage", "1.0")     RegisterHam(Ham_Player_Jump, "player", "Player_Jump")     register_forward(FM_UpdateClientData, "UpdateClientData")     register_forward(FM_CmdStart, "CmdStart")     register_forward(FM_PlayerPreThink, "client_prethink")     RegisterHam(Ham_Spawn, "player", "client_putinserver", 1)     RegisterHam(Ham_Killed, "player", "client_putinserver", 1)     RegisterHam(Ham_TakeDamage, "player", "Ham_TakeDamage_player")     register_concmd("amx_autobhop", "AdminCmd_Bhop", ADMIN_LEVEL_A, "<nick|#userid> <0|1>")     server_cmd("sv_maxspeed 1000");     g_pcvarGravity = get_cvar_pointer("sv_gravity");         if(cstrike_running())         register_logevent("round_start", 2, "1=Round_Start") &&     register_logevent("round_end", 2, "1=Round_End"); } public round_start()     cool_down_active = false public round_end()     cool_down_active = true public client_prethink(id) {     if( cool_down_active == false )     {     #define IS_THERE (~(1<<IN_SCORE))     if( (pev(id, pev_button) & IS_THERE) && (pev(id, pev_oldbuttons) & IS_THERE) )return     else     normal_speed(id)     } } public normal_speed(id) {     if ( cstrike_running() )     set_pev(id,pev_maxspeed,320.0);     if ( is_running("gearbox") == 1 )     set_pev(id,pev_maxspeed,272.0); } public client_putinserver(id) {     g_bAlive[id] = bool:is_user_alive(id) } public Ham_TakeDamage_player(id, ent, idattacker, Float:damage, damagebits) {     if( damagebits != DMG_FALL )         return HAM_IGNORED     damage *= get_pcvar_float(g_pcvarFallDamage)     SetHamParamFloat(4, damage)     return HAM_HANDLED } public CmdStart(id, uc_handle, seed) {     if( cool_down_active == false )     {     if(    g_bAlive[id]     &&    get_pcvar_num(g_pcvarBhopStyle)     &&    get_uc(uc_handle, UC_Buttons) & IN_USE     &&    pev(id, pev_flags) & FL_ONGROUND    )     {         static Float:fVelocity[3]         pev(id, pev_velocity, fVelocity)         fVelocity[0] *= 0.3         fVelocity[1] *= 0.3         fVelocity[2] *= 0.3         set_pev(id, pev_velocity, fVelocity)     }     } } public Player_Jump(id) { if( cool_down_active == true ) /*eliminate mp_freeze time exploit*/     return// PLUGIN_HANDLED_MAIN; else     {     set_pev(id,pev_maxspeed,700.0);     if( !g_bAlive[id] || cool_down_active || !is_user_outside(id))     {         return     }     static iBhopStyle ; iBhopStyle = get_pcvar_num(g_pcvarBhopStyle)     if(!iBhopStyle)     {         static iOldButtons ; iOldButtons = pev(id, pev_oldbuttons)         if( (get_pcvar_num(g_pcvarAutoBhop) || g_bAutoBhop[id]) && iOldButtons & IN_JUMP && pev(id, pev_flags) & FL_ONGROUND)         {             iOldButtons &= ~IN_JUMP             set_pev(id, pev_oldbuttons, iOldButtons)             set_pev(id, pev_gaitsequence, PLAYER_JUMP)             set_pev(id, pev_frame, 0.0)             return         }         return     }     if( g_iCdWaterJumpTime[id] )     {         //client_print(id, print_center, "Water Jump !!!")         return     }     if( pev(id, pev_waterlevel) >= 2 )     {         return     }     static iFlags ; iFlags = pev(id, pev_flags)     if( !(iFlags & FL_ONGROUND) )     {         return     }     static iOldButtons ; iOldButtons = pev(id, pev_oldbuttons)     if( !get_pcvar_num(g_pcvarAutoBhop) && !g_bAutoBhop[id] && iOldButtons & IN_JUMP )     {         return     }     // prevent the game from making the player jump     // as supercede this forward just fails     set_pev(id, pev_oldbuttons, iOldButtons | IN_JUMP)     static Float:fVelocity[3]     pev(id, pev_velocity, fVelocity)     if(iBhopStyle == 1)     {         static Float:fMaxScaledSpeed         pev(id, pev_maxspeed, fMaxScaledSpeed)         if(fMaxScaledSpeed > 0.0)         {             fMaxScaledSpeed *= BUNNYJUMP_MAX_SPEED_FACTOR             static Float:fSpeed             fSpeed = floatsqroot(fVelocity[0]*fVelocity[0] + fVelocity[1]*fVelocity[1] + fVelocity[2]*fVelocity[2])             if(fSpeed > fMaxScaledSpeed)             {                 static Float:fFraction                 fFraction = ( fMaxScaledSpeed / fSpeed ) * 0.65                 fVelocity[0] *= fFraction                 fVelocity[1] *= fFraction                 fVelocity[2] *= fFraction             }         }     }     new Float:normal_speed;     if ( cstrike_running() )     normal_speed = 320.0;     if ( is_running("gearbox") == 1 )     normal_speed = 272.0;     static Float:fFrameTime, Float:fPlayerGravity     global_get(glb_frametime, fFrameTime)     pev(id, pev_gravity, fPlayerGravity)     new iLJ     if(    (pev(id, pev_bInDuck) || iFlags & FL_DUCKING)     &&    get_pdata_int(id, OFFSET_CAN_LONGJUMP)     &&    pev(id, pev_button) & IN_DUCK     &&    pev(id, pev_flDuckTime)    )     {         static Float:fPunchAngle[3], Float:fForward[3]         pev(id, pev_punchangle, fPunchAngle)         fPunchAngle[0] = -5.0         set_pev(id, pev_punchangle, fPunchAngle)         global_get(glb_v_forward, fForward)         fVelocity[0] = fForward[0] * 560         fVelocity[1] = fForward[1] * 560         fVelocity[2] = normal_speed         iLJ = 1     }     else     {         fVelocity[2] = normal_speed     }     fVelocity[2] -= fPlayerGravity * fFrameTime * 0.5 * get_pcvar_num(g_pcvarGravity)     set_pev(id, pev_velocity, fVelocity)     set_pev(id, pev_gaitsequence, PLAYER_JUMP+iLJ)     set_pev(id, pev_frame, 0.0)     client_cmd(id,"cl_forwardspeed 700.0")     client_cmd(id,"cl_sidespeed 350.0")     }     //return PLUGIN_CONTINUE; } public UpdateClientData(id, sendweapons, cd_handle) {     g_iCdWaterJumpTime[id] = get_cd(cd_handle, CD_WaterJumpTime) } public AdminCmd_Bhop(id, level, cid) {     if(!cmd_access(id, level, cid, 2) )     {         return PLUGIN_HANDLED     }     new szPlayer[32]     read_argv(1, szPlayer, 31)     new iPlayer = cmd_target(id, szPlayer, CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF | CMDTARGET_NO_BOTS)     if( !iPlayer )     {         return PLUGIN_HANDLED     }     if( read_argc() < 3 )     {         g_bAutoBhop[iPlayer] = !g_bAutoBhop[iPlayer]     }     else     {         new arg2[2]         read_argv(2, arg2, 1)         if(arg2[0] == '1' && !g_bAutoBhop[iPlayer])         {             g_bAutoBhop[iPlayer] = true         }         else if(arg2[0] == '0' && g_bAutoBhop[iPlayer])         {             g_bAutoBhop[iPlayer] = false         }     }     client_print(id, print_console, "Player %s autobhop is currently : %s", szPlayer, g_bAutoBhop[iPlayer] ? "On" : "Off")     return PLUGIN_HANDLED } stock Float:is_user_outside(id) {     new Float:vOrigin[3], Float:fDist;     pev(id, pev_origin, vOrigin);     fDist = vOrigin[2];     while(engfunc(EngFunc_PointContents, vOrigin) == CONTENTS_EMPTY)         vOrigin[2] += 5.0;     if(engfunc(EngFunc_PointContents, vOrigin) == CONTENTS_SKY)         return (vOrigin[2] - fDist);     return 0.0; }
__________________

Last edited by DJEarthQuake; 11-28-2020 at 13:01. Reason: Fix freezetime exploit. Make bhop only work outdoors.
DJEarthQuake is offline
Repsol
Junior Member
Join Date: Jun 2020
Old 06-14-2020 , 01:49   Re: Bunny Hop
Reply With Quote #15

Quote:
Originally Posted by DJEarthQuake View Post
@Repsol. This should be to your spec without multiple plugins. Once player bhops they can continue to run at faster than normal speed. If player stops it sets it back to normal until they activate it again by the bhop.
Thank you so much for helping me

But look at the action
Video:

https://youtu.be/jH9swAIVj28
Repsol is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 06-14-2020 , 08:54   Re: Bunny Hop
Reply With Quote #16

bro change sv_airaccelerate to 100....
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
Repsol
Junior Member
Join Date: Jun 2020
Old 06-14-2020 , 10:10   Re: Bunny Hop
Reply With Quote #17

Quote:
Originally Posted by JocAnis View Post
bro change sv_airaccelerate to 100....

Thanks A Looooot
Repsol is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:16.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode