Results 1 to 10 of 10
  1. #1
    arun823's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Los Angeles, California
    Posts
    524
    Reputation
    151
    Thanks
    1,887
    My Mood
    Amused

    Controllable Rapid Speeds?

    Hey, I was just wondering how to make rapid fire "more controllable" so instead it being set at max you can set it to a certain speed. Here's the code for rapid fire, so basically what I'm saying is if there is a way to slow rapid fire down by changing the bytes? Oh and ignore the blabla stuff, it's just to help reduce lag.

    Code:
    if(GetAsyncKeyState(VK_LBUTTON)<0 && IRapidfire && Status) 
    	{
    		if( !blabla[0] )
    		{
    			WriteOpCode((PBYTE)RapidFire, (PBYTE)"\x90\x90", 2);
    			blabla[0] = true;
    		}
    	} else {
    		if( blabla[0] )		
    		{
    			WriteOpCode((PBYTE)RapidFire, (PBYTE)"\x74\x3E", 2);
    			blabla[0] = false;
    		}
    	}

  2. #2
    Xipher's Avatar
    Join Date
    Jul 2011
    Gender
    male
    Location
    Melbourne, AU.
    Posts
    1,784
    Reputation
    472
    Thanks
    1,688
    My Mood
    Innocent
    Nothing to do with changing the bytes.

    Here's a hint, add a clock timer to the rapidfire.

  3. #3
    arun823's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Los Angeles, California
    Posts
    524
    Reputation
    151
    Thanks
    1,887
    My Mood
    Amused
    Quote Originally Posted by Xipher View Post
    Nothing to do with changing the bytes.

    Here's a hint, add a clock timer to the rapidfire.
    Ok, so what's an ideal clock time?

  4. #4
    Xipher's Avatar
    Join Date
    Jul 2011
    Gender
    male
    Location
    Melbourne, AU.
    Posts
    1,784
    Reputation
    472
    Thanks
    1,688
    My Mood
    Innocent
    I believe i'm using 90 milliseconds for mine.

  5. The Following User Says Thank You to Xipher For This Useful Post:

    arun823 (06-18-2012)

  6. #5
    matypatty's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Posts
    863
    Reputation
    156
    Thanks
    2,689
    My Mood
    Amused
    clock_t timer;

    if (clock() < timer)
    {
    deactivate();
    }else{
    timer = clock () + 0.08 * CLOCKS_PER_SEC ;
    activate();
    }

  7. The Following User Says Thank You to matypatty For This Useful Post:

    arun823 (06-18-2012)

  8. #6
    Xipher's Avatar
    Join Date
    Jul 2011
    Gender
    male
    Location
    Melbourne, AU.
    Posts
    1,784
    Reputation
    472
    Thanks
    1,688
    My Mood
    Innocent
    ^ Yeah what mat posted.

  9. The Following User Says Thank You to Xipher For This Useful Post:

    arun823 (06-18-2012)

  10. #7
    arun823's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Los Angeles, California
    Posts
    524
    Reputation
    151
    Thanks
    1,887
    My Mood
    Amused
    Quote Originally Posted by Xipher View Post
    ^ Yeah what mat posted.
    It won't stop firing -__-

    Code:
    clock_t timer;
    	if(GetAsyncKeyState(VK_LBUTTON)<0 && IRapidFire && Status) 
    	{
    		if(clock() < timer)
                            {
                                    WriteOpCode( (PBYTE)RapidFire1, (PBYTE)"\x74\x09", 2);
                                    WriteOpCode( (PBYTE)RapidFire2, (PBYTE)"\x80\xBE\xE0\x00\x00\x00\x00", 7);
                                    WriteOpCode( (PBYTE)RapidFire3, (PBYTE)"\x7E\x15", 2);
                                    WriteOpCode( (PBYTE)RapidFire4, (PBYTE)"\x74\x3E", 2);
    				WriteOpCode( (PBYTE)RapidFire5, (PBYTE)"\x8B\x86\xEC\x00\x00\x00", 6);
                            }
                            else
                            {
                                    timer = clock() + 0.09 * CLOCKS_PER_SEC;
                                    WriteOpCode((PBYTE)RapidFire1, (PBYTE)"\x90\x90", 2);
    				WriteOpCode((PBYTE)RapidFire2, (PBYTE)"\x90\x90\x90\x90\x90\x90\x90", 7);
    				WriteOpCode((PBYTE)RapidFire3, (PBYTE)"\x90\x90", 2);
    				WriteOpCode((PBYTE)RapidFire4, (PBYTE)"\x90\x90", 2);
    			        WriteOpCode((PBYTE)RapidFire5, (PBYTE)"\x90\x90\x90\x90\x90\x90", 6);
                            }
    	}

  11. #8
    Reflex-'s Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    192.168.1.01
    Posts
    6,633
    Reputation
    584
    Thanks
    2,261
    My Mood
    Dead
    Quote Originally Posted by arun823 View Post
    Hey, I was just wondering how to make rapid fire "more controllable" so instead it being set at max you can set it to a certain speed. Here's the code for rapid fire, so basically what I'm saying is if there is a way to slow rapid fire down by changing the bytes? Oh and ignore the blabla stuff, it's just to help reduce lag.

    Code:
    if(GetAsyncKeyState(VK_LBUTTON)<0 && IRapidfire && Status) 
    	{
    		if( !blabla[0] )
    		{
    			WriteOpCode((PBYTE)RapidFire, (PBYTE)"\x90\x90", 2);
    			blabla[0] = true;
    		}
    	} else {
    		if( blabla[0] )		
    		{
    			WriteOpCode((PBYTE)RapidFire, (PBYTE)"\x74\x3E", 2);
    			blabla[0] = false;
    		}
    	}
    Here's a Working Rapidfire
    http://www.mpgh.net/forum/207-combat...addresses.html

    Credits to Atomic,
    This also includes a Clock Timer just as @Xipher Stated.

  12. The Following User Says Thank You to Reflex- For This Useful Post:

    arun823 (06-18-2012)

  13. #9
    arun823's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Los Angeles, California
    Posts
    524
    Reputation
    151
    Thanks
    1,887
    My Mood
    Amused
    Quote Originally Posted by Entourage View Post


    Here's a Working Rapidfire
    http://www.mpgh.net/forum/207-combat...addresses.html

    Credits to Atomic,
    This also includes a Clock Timer just as @Xipher Stated.
    Thanks, I already got it working, but it won't stop shooting now..

  14. #10
    Departure's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    818
    Reputation
    125
    Thanks
    1,785
    My Mood
    Doh
    The most easiest way to create a timer is make a new thread when rapidfire is enabled and dispose of thread when disabled, anyway in the thread you can use the sleep function to set a boolean for rapidfire...

    example...
    Code:
    while (True) do
     begin
      asm
       pushad;
      end;
      
      RapidFireWrite:= Not RapidFireWrite;
      Sleep(90);
    
      asm
       popad;
      end;
    end;
    then in your main hack thread you would check the condition of RapidFireWrite..

    While RapidFireWrite = True do
    writebytes(rapidfireON);

    writebyte(rapidfireOFF);


    anyway you get the idea, the extra thread for the "timer" is used to stop lag and make it more readable and easier to implement.
    Last edited by Departure; 06-20-2012 at 02:26 AM.

Similar Threads

  1. [Discussion] Whats guns do you think will be used with rapid fire controllers?
    By warlordshin in forum Call of Duty Modern Warfare 3 Discussions
    Replies: 16
    Last Post: 09-22-2011, 01:19 PM
  2. [Release] Controllable Rapid
    By Stephen in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 11
    Last Post: 05-14-2011, 06:42 AM
  3. how much would a 3 speed RF xbox controller be?
    By Donnuh in forum XBOX Customizing & Modding
    Replies: 13
    Last Post: 05-07-2011, 11:25 AM
  4. [Release] Braco22 - Controllable Semi Ghost-Mode! (5 Speeds + Assist)
    By Braco22 in forum Combat Arms Hacks & Cheats
    Replies: 91
    Last Post: 07-30-2010, 04:43 AM
  5. [Snippet]Controlable speed and gravity
    By apandhi in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 8
    Last Post: 02-21-2010, 06:40 PM