Raised This Month: $32 Target: $400
 8% 

Best way to make auto bunnyhop in module?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
11922911
Senior Member
Join Date: Dec 2011
Location: Yuen Long Country
Old 04-30-2013 , 04:40   Best way to make auto bunnyhop in module?
Reply With Quote #1

My method is hooking PlayerPreThink, and setting player->velocity.z when press jump button/on ground or something...

Are there any other ways to make auto bunnyhop?

sry for my english

Last edited by 11922911; 05-10-2013 at 05:08.
11922911 is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 04-30-2013 , 13:23   Re: Best way to make auto bunnyhop in module?
Reply With Quote #2

Hooking Player_Jump.
__________________

Last edited by claudiuhks; 05-02-2013 at 06:41.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
lazarev
Veteran Member
Join Date: Sep 2008
Old 04-30-2013 , 14:37   Re: Best way to make auto bunnyhop in module?
Reply With Quote #3

Quote:
Originally Posted by claudiuhks View Post
Hooking Player_Duck.
are you freaking serious?
lazarev is offline
11922911
Senior Member
Join Date: Dec 2011
Location: Yuen Long Country
Old 04-30-2013 , 22:18   Re: Best way to make auto bunnyhop in module?
Reply With Quote #4

You mean... Player_Jump?

Last edited by 11922911; 04-30-2013 at 22:20.
11922911 is offline
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 05-01-2013 , 08:25   Re: Best way to make auto bunnyhop in module?
Reply With Quote #5

he means pEntity -> v.flag & IN_DUCK
TheDS1337 is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 05-01-2013 , 14:12   Re: Best way to make auto bunnyhop in module?
Reply With Quote #6

Quote:
Originally Posted by lazarev View Post
are you freaking serious?
Sorry, what's wrong in there?

Quote:
Originally Posted by 11922911 View Post
You mean... Player_Jump?
Player_Jump forward is executed on every player's frame while he is holding +jump button.

http://forums.alliedmods.net/showthr...am_Player_Jump
__________________

Last edited by claudiuhks; 05-02-2013 at 06:41.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-02-2013 , 02:20   Re: Best way to make auto bunnyhop in module?
Reply With Quote #7

on PM_Jump, remove IN_JUMP from pmove->oldbuttons

Jumps is proceeded in PM_JUMP, so this is correct place for you.
Jumps is made if player is on ground, and if oldbuttons don't contain IN_JUMP.

So, do what i told, and don't apply any velocity, jump gonna be made directly by the game.

see HLSDK multiplayer/pm_shared/pm_shared.c
Code:
void PM_Jump (void)
{
// [ ... ]
	if ( pmove->oldbuttons & IN_JUMP )
		return;		// don't pogo stick

You can also remove in PlayerPreThink IN_JUMP from pev->oldbuttons, because PM_* are executed after PreThink and pmove are copied from pev in there. Method gonna be easier to code but a bit less efficient, but in a module it seems ok.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 05-02-2013 at 02:26.
ConnorMcLeod is offline
11922911
Senior Member
Join Date: Dec 2011
Location: Yuen Long Country
Old 05-02-2013 , 05:46   Re: Best way to make auto bunnyhop in module?
Reply With Quote #8

In your method (just remove IN_JUMP from oldbuttons)
Also be removed speed limit?

And i have no idea how to hook PM_Jump function, Could you give me some examples?

Last edited by 11922911; 05-02-2013 at 06:21.
11922911 is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 05-02-2013 , 06:39   Re: Best way to make auto bunnyhop in module?
Reply With Quote #9

Connor says hooking PM_* functions are a bit less efficient. Instead of hooking Player_[Pre|Post]Think you could just hook Player_Jump to avoid so many checks.
__________________

Last edited by claudiuhks; 05-02-2013 at 06:43.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
11922911
Senior Member
Join Date: Dec 2011
Location: Yuen Long Country
Old 05-02-2013 , 06:58   Re: Best way to make auto bunnyhop in module?
Reply With Quote #10

Oh sorry, I didn't read the post thoroughly..
11922911 is offline
Reply


Thread Tools
Display Modes

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 11:10.


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