Results 1 to 4 of 4
  1. #1
    TwiistZ's Avatar
    Join Date
    Sep 2016
    Gender
    male
    Posts
    227
    Reputation
    10
    Thanks
    13
    My Mood
    Angelic

    I found a source for bunny hop on OS X.

    How do i implement this into xCode. None of this is mine i found it on ****** and am trying to make a multihack
    Code:
    Code:
    #include <iostream>
    #include <stdlib.h>
    #include <ApplicationServices/ApplicationServices.h>
    #include <Carbon/Carbon.h>
    
    class Bunnyhop
    {
    public:
        void sendKey(CGKeyCode keyCode, int delay)
        {
            CGEventSourceRef source = CGEventSourceCreate(kCGEventSourceStateCombinedSessionState);
            
            CGEventRef spaceKeyUp;
            CGEventRef spaceKeyDown;
            
            spaceKeyUp = CGEventCreateKeyboardEvent(source, keyCode, false);
            spaceKeyDown = CGEventCreateKeyboardEvent(source, keyCode, true);
            
            CGEventPost(kCGHIDEventTap, spaceKeyDown);
            usleep(delay);
            CGEventPost(kCGHIDEventTap, spaceKeyUp);
            
            CFRelease(spaceKeyUp);
            CFRelease(spaceKeyDown);
            CFRelease(source);
        }
        
        Boolean isPressed(unsigned short inKeyCode)
        {
            unsigned char keyMap[16];
            GetKeys((BigEndianUInt32*) &keyMap);
            return (0 != ((keyMap[ inKeyCode >> 3] >> (inKeyCode & 7)) & 1));
        }
    
        void jump()
        {
            int randomDelay = rand()%(1000 - 600 + 1) + 600;
            
            // You need to get the velocity of the player if you want
            Vector3 velo = localPlayer.vecVelocity; // comment this line if you don't want to check that the player is moving
            
            // If u press and hold Space, you are alive, you move and you are on the ground (standing or crouched) bunnyhop triggers
            if(
               velo.x != 0.0f && // comment this line if you don't want to check that the player is moving
               velo.y != 0.0f && // comment this line if you don't want to check that the player is moving
               isPressed(kVK_Space) &&
               (localPlayer.iFlags == 257 || localPlayer.iFlags == 263) &&
               localPlayer.iHealth >= 1
            )
            {
                sendKey(kVK_Space, randomDelay);
            }
        }
    }
    Last edited by TwiistZ; 10-23-2016 at 10:51 AM.

  2. #2
    dbaum101's Avatar
    Join Date
    Oct 2016
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0
    If you are asking how to implement this it means you have no understanding of the language at all, I recommend getting some knowledge about c++ by reading a book or something. These threads are kinda annoying imo. Sorry if this post does not assist you in one way or another.

  3. #3
    TwiistZ's Avatar
    Join Date
    Sep 2016
    Gender
    male
    Posts
    227
    Reputation
    10
    Thanks
    13
    My Mood
    Angelic
    ok because maybe helping me out or teaching me is too hard so instead just leave a stupid comment. Thanks. Its okay though i have a way better multi hack now

  4. #4
    Smoke's Avatar
    Join Date
    Nov 2014
    Gender
    male
    Posts
    11,899
    Reputation
    2661
    Thanks
    4,610
    My Mood
    Amazed
    Been over a week since last update/bump after answers, assuming solved.

    /Closed.


    CLICK TO BUY NOW!!


    Quote Originally Posted by Liz View Post
    This is my first vouch, ever. Rapidgator account worked perfectly. Would buy in the future.

Similar Threads

  1. [Source Code] I found some source codes for CA hacks (Ithink-Aimbot)
    By trane25 in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 14
    Last Post: 01-02-2014, 08:35 AM
  2. Replies: 1
    Last Post: 01-04-2012, 06:42 PM
  3. [Release]Bunny Hop Source
    By Iamazn in forum Visual Basic Programming
    Replies: 7
    Last Post: 10-03-2009, 12:33 AM
  4. Bunny Hop Program-Perfect for Shotguns
    By /gyuhgg545 in forum Combat Arms Europe Hacks
    Replies: 29
    Last Post: 06-17-2009, 10:18 AM
  5. Bunny Hop Program-Perfect for Shotguns
    By /gyuhgg545 in forum Combat Arms Hacks & Cheats
    Replies: 32
    Last Post: 04-13-2009, 12:56 PM