Raised This Month: $ Target: $400
 0% 

Ways to enlarge the maximum jump velocity of the player?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AnimalMonster
Senior Member
Join Date: May 2020
Old 12-14-2022 , 11:07   Ways to enlarge the maximum jump velocity of the player?
Reply With Quote #1

Does anyone know an effective and simple way to enlarge maximum jump velocity of the player, on any engine (ReHLDS, HLDS)?
AnimalMonster is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 12-14-2022 , 12:01   Re: Ways to enlarge the maximum jump velocity of the player?
Reply With Quote #2

change his vel[ 2 ] ?

Code:
public client_PreThink( id )
{
    if( !is_user_alive( id ) )
        return PLUGIN_CONTINUE

    if( pev( id, pev_flags ) & FL_ONGROUND && pev( id, pev_button ) & IN_JUMP )
    {
        new Float: vel[ 3 ]
        pev( id, pev_velocity, vel )
        vel[ 2 ] += 300.0
        set_pev( id, pev_velocity, vel )
    }
}
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
MrPickles
Senior Member
Join Date: Aug 2022
Location: Colombia
Old 12-14-2022 , 19:00   Re: Ways to enlarge the maximum jump velocity of the player?
Reply With Quote #3

Quote:
Originally Posted by JocAnis View Post
change his vel[ 2 ] ?

Code:
public client_PreThink( id )
{
    if( !is_user_alive( id ) )
        return PLUGIN_CONTINUE

    if( pev( id, pev_flags ) & FL_ONGROUND && pev( id, pev_button ) & IN_JUMP )
    {
        new Float: vel[ 3 ]
        pev( id, pev_velocity, vel )
        vel[ 2 ] += 300.0
        set_pev( id, pev_velocity, vel )
    }
}

RegisterHam( Ham_Player_Jump, "player", "Ham_PlayerBlock" )

better use Ham Jump instead of client_prethink
MrPickles is offline
AnimalMonster
Senior Member
Join Date: May 2020
Old 12-15-2022 , 03:53   Re: Ways to enlarge the maximum jump velocity of the player?
Reply With Quote #4

I always thought that those wouldn't work correctly since when the pksyer jumps the velocity slowly gets to the max height when jumping.
AnimalMonster is offline
AnimalMonster
Senior Member
Join Date: May 2020
Old 12-20-2022 , 11:18   Re: Ways to enlarge the maximum jump velocity of the player?
Reply With Quote #5

How about this?
https://github.com/s1lentq/ReGameDLL...ared.cpp#L2345
Recently found this and looks like what i've been searching for! I can just check if the player is in water to let it cover that part.
AnimalMonster 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 15:33.


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