Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cPlayer* g_pPlayer = new cPlayer;
- void cPlayer::Bhop(CUserCmd* pCmd)
- {
- static auto bJumped = false;
- static auto bFake = false;
- if(!bJumped && bFake)
- {
- bFake = false;
- pCmd->buttons |= IN_JUMP;
- }
- else if(pCmd->buttons & IN_JUMP)
- {
- if(Global::LocalPlayer->GetFlags() & FL_ONGROUND)
- {
- bJumped = true;
- bFake = true;
- }
- else
- {
- pCmd->buttons &= ~IN_JUMP;
- bJumped = false;
- }
- }
- else
- {
- bJumped = false;
- bFake = false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement