Raised This Month: $ Target: $400
 0% 

Jump Height Modifier


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
striker07
Veteran Member
Join Date: Mar 2012
Location: Solar System/Earth/Belgi
Old 09-17-2012 , 20:13   Jump Height Modifier
Reply With Quote #1

I just meshed up this lil code to increase the players jump height when he jumps,
I was wondering if this would work (cant test it myself for the moment).
(raising the players jump height with lowering the gravity for him is not an option.)
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
 
#define PLUGIN "Jump height modifier"
#define VERSION "0.0.1"
#define AUTHOR "striker07"
 
public plugin_init()
{
     
register_plugin(PLUGINVERSIONAUTHOR);
 
     
RegisterHam(Ham_Player_Jump"player""fwdPlayerJump");
}
public 
fwdPlayerJump(id)
{
     if(!(
pev(idpev_flags) & FL_ONGROUND))
     {
          static 
Float:velocity[3];
          
pev(idpev_velocityvelocity);
 
          
velocity[2] = velocity[2] * (0.1 levelvariable)
 
          
set_pev(idpev_velocityvelocity)
     }

__________________

Working on:
[CSGO/CSS] Mmorpg - an extensive XP/level modulair platform
Progress: [♣♣♣♣♣♣♣|♣♣♣]
striker07 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 09-18-2012 , 20:38   Re: Jump Height Modifier
Reply With Quote #2

You have the right idea by increasing velocity. Your code will need more work, though.
__________________
Bugsy is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 09-19-2012 , 02:23   Re: Jump Height Modifier
Reply With Quote #3

velocity[2] = velocity[2] * (0.1 * levelvariable)
that will actually decrease the jump height if levelvariable < 10

Last edited by jimaway; 09-19-2012 at 02:24.
jimaway is offline
striker07
Veteran Member
Join Date: Mar 2012
Location: Solar System/Earth/Belgi
Old 09-19-2012 , 10:56   Re: Jump Height Modifier
Reply With Quote #4

Quote:
Originally Posted by Bugsy View Post
You have the right idea by increasing velocity. Your code will need more work, though.
Ok thanks,
and its been a while since i've seen you, sup?

Quote:
Originally Posted by jimaway View Post
velocity[2] = velocity[2] * (0.1 * levelvariable)
that will actually decrease the jump height if levelvariable < 10
yes i noticed yesterday wen i made some extra stuff for it .
did the first test yesterday too and i noticed that when you jump once, by the time you press the jump button again while still going upward from previous jump, the velocity is already set as a downard velocity ^^ so i just killed myself when i jumped and jump again
pretty strange physics
__________________

Working on:
[CSGO/CSS] Mmorpg - an extensive XP/level modulair platform
Progress: [♣♣♣♣♣♣♣|♣♣♣]

Last edited by striker07; 09-19-2012 at 10:58.
striker07 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 09-19-2012 , 21:38   Re: Jump Height Modifier
Reply With Quote #5

Quote:
Originally Posted by striker07 View Post
Ok thanks,
and its been a while since i've seen you, sup?
Chillin, busy with life, don't have as much free time as I used to.
__________________
Bugsy is offline
striker07
Veteran Member
Join Date: Mar 2012
Location: Solar System/Earth/Belgi
Old 09-21-2012 , 06:51   Re: Jump Height Modifier
Reply With Quote #6

Quote:
Originally Posted by Bugsy View Post
Chillin, busy with life, don't have as much free time as I used to.
ah i see, to bad you are a great coder ^^

anyway to get back to the topic, this is what i have now, (it's going to be an rpgx upgrade)

The jumps height are not modified, when i used client_prints to debug none of the prints came up so i think its not working, as how it is coded now only the jumps after the first jumps should increase the jump height, but i dont think its working and the first jump should aslo be modified, any help?

tryed with fakemeta, didnt work now with engine and it still doesnt work :s

http://pastebin.com/YCMEp8ft
__________________

Working on:
[CSGO/CSS] Mmorpg - an extensive XP/level modulair platform
Progress: [♣♣♣♣♣♣♣|♣♣♣]

Last edited by striker07; 09-21-2012 at 06:54.
striker07 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 08:12.


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