Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Simple-TUT]Set jump height by mapID

Junior Spellweaver
Joined
Jun 15, 2016
Messages
139
Reaction score
37
This is really simple code. SOmeone way find use of it!

It allows you to set different jump heights in different maps.

Search for

Code:
 JumpVelocity  = 17;

add below

Code:
 if (Keyboard->IsPressed(kbsV) && (gClientLogic().m_gameInfo.mapId==GBGameInfo::MAPID_WZ_Colorado))                {                uberAnim_->StartJump();                JumpVelocity  = 20;                }

You can change the MapID and the height of the jump. Like I said simple! Maybe good or useless. Depends on how you use it.

Enjoy

---------------UPDATED--------------

Small bug fix: The game things you are cheating when you hand in the air for too long.

Search for : m_PlayerFlyingAntiCheatTimer >

Change to m_PlayerFlyingAntiCheatTimer > 10.0f

Works fine for me.

If people are using the code and thinking it doesnt work. You have to hold V then jump using space to use the different jump height.
 
Last edited:
Junior Spellweaver
Joined
Oct 25, 2017
Messages
158
Reaction score
17
How to make that it was possible to use only on a private server?
 
Junior Spellweaver
Joined
Dec 18, 2014
Messages
108
Reaction score
25
delete this post pls
 
Last edited:
Junior Spellweaver
Joined
Oct 25, 2017
Messages
158
Reaction score
17
Fix for this not need V+Space:rolleyes:

Found : // process jump after assigning InputAcceleration, so that we can predict where player will jump

and add this code

Code:
            else if (pl->bOnGround && (Keyboard->IsPressed(kbsV) || Gamepad->WasPressed(gpA))
                && !crouching
                && !proning
                && !swimming
                && !pl->IsJumpActive()
                && prevAccel.z >= 0 /* prevent jump backward*/
                )
            {
                pl->StartJump();
            }
        }
 
Back
Top