GPC Library

Gta v rad rapidfire

fast asf.
Version 2
Author Kylespeed2
Publish Date 2017-03-19 21:12:12
Update Date 2017-03-20 22:52:34
Downloads 37
RATE


1

0

Code:Select all
// GPC Online Library
// antirecoil_and_rapidfire,_both_adjustable_on_the_fly,_with_on/off_and_save_function.gpc

//-------------------------------------------------------------------------------------------
//  ANTIRECOIL and RAPIDFIRE, both adjustable on the fly, with ON/OFF and SAVE function
//-------------------------------------------------------------------------------------------
//  Version: 4.00
//  System: Multiplatform 
//  Controller: Multiplatform 
//  Game: Grand theft auto 5
//  Author: LEX LOST and Me but its not very much im still learning this form of coding
//-------------------------------------------------------------------------------------------

//               XBOX INSTRUCTIONS:

// RAPIDFIRE (ON by default - Start value: 23)
// Hold LT and Press A to Enable or Disable Rapidfire (with rumble notify)
// Hold A and tap UP to increase Rate of Fire (+1 each tap on UP, while holding A)
// Hold A and tap DOWN to decrease Rate of Fire (-1 each tap on DOWN, while holding A)
// Save Rate of Fire: Hold LT and press MENU (or START, for XBOX360 users)

// ANTIRECOIL (ON by default - Start value: 30)
// Hold LT and Press X to Enable or Disable Antirecoil (with rumble notify)
// Hold LT and tap UP to increase Antirecoil (+1 each tap on UP, while holding LT)
// Hold LT and tap DOWN to decrease Antirecoil (-1 each tap on DOWN, while holding LT)
// Save Antirecoil: Hold LT and press Y
    
//-------------------------------------------------------------------------------------------

//               PLAYSTATION INSTRUCTIONS:

// RAPIDFIRE (ON by default - Start value: 13)
// Hold L2 and Press CROSS to Enable or Disable Rapidfire (with rumble notify)
// Hold CROSS and tap UP to increase Rate of Fire (+1 each tap on UP, while holding CROSS)
// Hold CROSS and tap DOWN to decrease Rate of Fire (-1 each tap on DOWN, while holding CROSS)
// Save Rate of Fire: Hold L2 and press OPTIONS (or START, for PS3 users)

// ANTIRECOIL (ON by default - Start value: 30)
// Hold L2 and Press SQUARE to Enable or Disable Antirecoil (with rumble notify)
// Hold L2 and tap UP to increase Antirecoil (+1 each tap on UP, while holding L2)
// Hold L2 and tap DOWN to decrease Antirecoil (-1 each tap on DOWN, while holding L2)
// Save Antirecoil: Hold L2 and press TRIANGLE

//-------------------------------------------------------------------------------------------

//DECLARARATIONS - define

define RECOIL_UP = 0;     
define RECOIL_DOWN = 0;   
define ONLY_WITH_SCOPE = TRUE; // if TRUE Antirecoil only when scoping
define Reload=18;    // X/ SQUARE 


define AR_Release = 0; // change this value to determine when antirecoil stops working (min: antirecoil value)

    
   define ANTI_RECOIL_LEFT = 0;  //change this value to compensate to the left (0 - 100)
    define ANTI_RECOIL_RIGHT = 0; //change this value to compensate to the right (0 - 100)
define L_X           = XB1_LX;                              
define L_Y           = XB1_LY;
    define R_X           = XB1_RX;                              
define R_Y           = XB1_RY;                              
    define RT   = XB1_RT;
    define LT   = XB1_LT;  
//
//VARIABLES - int
int fire_button;
int fire_button2;
int fire_button3;
int fire_button4;
int scope_button;
int scope_button2;
int scope_button3;
int hold_time;
int rest_time;
int recoil_onoff = TRUE; // if TRUE ANTIRECOIL is ON by default - if FALSE, OFF by default
int rapid_onoff = TRUE; // if TRUE RAPIDFIRE is ON by default - if FALSE, OFF by default
int RATE_OF_FIRE = 285; // Range: 1 to 25090000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 RPS (Round/s)
int RATE_OF_FIRE2 = 95; // Range: 1 to 250000000000900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 RPS (Round/s)
int ANTI_RECOIL;
int ANTI_RECOIL2;
int RATE_OF_FIRE3 = 95; // Range: 1 to 2500000000000000000000009000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 RPS (Round/s)
int RATE_OF_FIRE4 = 95; // Range: 1 to 2500000000009000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 RPS (Round/s)
int anti_recoil; 
int anti_recoil_left;
int dbl_time2;
int dbl_time ;
    int anti_recoil_right
//-------------------------------------------------------------------------------------------

//INITIALIZATION - init

init{
    if(get_console() == PIO_XB1) {
        fire_button = 4;
        scope_button = 7;
         scope_button3 = 19;
        scope_button2 = 6;
         scope_button3 = 6;
         fire_button2 = 20;
         fire_button4 = 19;
        }
    else { 
        fire_button = 4;
        scope_button = 7;
         fire_button2 = 20;
         fire_button3 = 6;
         scope_button2 = 6;
        fire_button4 = 19;
        }
    RATE_OF_FIRE=get_pvar(SPVAR_1,0,250,285);
     RATE_OF_FIRE2=get_pvar(SPVAR_1,0,250,95);
     RATE_OF_FIRE3=get_pvar(SPVAR_1,0,250,95);
    ANTI_RECOIL=get_pvar(SPVAR_2,0,100,0);
    ANTI_RECOIL2=get_pvar(SPVAR_2,0,100,0);
    RATE_OF_FIRE4=get_pvar(SPVAR_1,0,250,95);
    
     colorled(0,0,3,0); 
    hold_time = 2 / RATE_OF_FIRE;
    rest_time = hold_time - 2;
    if(rest_time < 0) rest_time = 0;
} 
 
//-------------------------------------------------------------------------------------------

//MAIN BLOCK ROUTINES

main { 
{
if(get_val(XB360_RX))
    sensitivity(XB360_RX, 40, 130);
    sensitivity(XB360_RY, 65, 130);
    deadzone(XB360_RX,XB360_RY,0,0);
    stickize(XB360_RX,XB360_RY,110);
}

     //RAPIDAIMM
  
   if(RATE_OF_FIRE){//---------------------------------------- 

       if (get_val(fire_button)){
               combo_run(Auto_Aimm);
      }else if(combo_running(Auto_Aimm)){    
               combo_stop (Auto_Aimm);

      }
       if (get_val(fire_button)){
               combo_run(Auto_Aimm);
      }else if(combo_running(Auto_Aimm)){    
               combo_stop (Auto_Aimm);

      }
       if (get_val(R_X)){
               combo_run(Auto_Aimm1);
      }else if(combo_running(Auto_Aimm)){    
               combo_stop (Auto_Aimm1);
         }
            if (get_val(fire_button)&& get_val(R_X)< -45){
               combo_stop(Auto_Aimm)
      }
            if (get_val(fire_button)&& get_val(R_X)> +45){
               combo_stop(Auto_Aimm)
      }
            if (get_val(fire_button)&& get_val(R_Y)< -45){
               combo_stop(Auto_Aimm)
      }
            if (get_val(fire_button)&& get_val(R_Y)> +45){
               combo_stop(Auto_Aimm)
      }
            if (get_val(fire_button)&& get_val(R_X)< -45){
               combo_stop(Auto_Aimm)
      }
            if (get_val(fire_button)&& get_val(R_X)> +45){
               combo_stop(Auto_Aimm)
      }
            if (get_val(fire_button)&& get_val(R_Y)< -45){
               combo_stop(Auto_Aimm)
      }
            if (get_val(fire_button)&& get_val(R_Y)> +45){
               combo_stop(Auto_Aimm)
      }
            if ( get_val(R_X)< -45){
               combo_stop(Auto_Aimm1)
      }
            if ( get_val(R_X)> +45){
               combo_stop(Auto_Aimm1)
      }
            if ( get_val(R_Y)< -45){
               combo_stop(Auto_Aimm1)
      }
            if ( get_val(R_Y)> +45){
               combo_stop(Auto_Aimm1)
      }
}

//RAPIDAIMM2
  
   if(RATE_OF_FIRE){//---------------------------------------- 

       if (get_val(fire_button)){
               combo_run(Auto_Aimm2);
      }else if(combo_running(Auto_Aimm2)){    
               combo_stop (Auto_Aimm2);

      }
       if (get_val(fire_button)){
               combo_run(Auto_Aimm2);
      }else if(combo_running(Auto_Aimm2)){    
               combo_stop (Auto_Aimm2);

      }
       if (get_val(L_X)){
               combo_run(Auto_Aimm3);
      }else if(combo_running(Auto_Aimm2)){    
               combo_stop (Auto_Aimm3);
         }
            if (get_val(fire_button)&& get_val(L_X)< -45){
               combo_stop(Auto_Aimm2)
      }
            if (get_val(fire_button)&& get_val(L_X)> +45){
               combo_stop(Auto_Aimm2)
      }
            if (get_val(fire_button)&& get_val(L_Y)< -45){
               combo_stop(Auto_Aimm2)
      }
            if (get_val(fire_button)&& get_val(L_Y)> +45){
               combo_stop(Auto_Aimm2)
      }
            if (get_val(fire_button)&& get_val(L_X)< -45){
               combo_stop(Auto_Aimm2)
      }
            if (get_val(fire_button)&& get_val(L_X)> +45){
               combo_stop(Auto_Aimm2)
      }
            if (get_val(fire_button)&& get_val(L_Y)< -45){
               combo_stop(Auto_Aimm2)
      }
            if (get_val(fire_button)&& get_val(L_Y)> +45){
               combo_stop(Auto_Aimm2)
      }
            if ( get_val(L_X)< -45){
               combo_stop(Auto_Aimm3)
      }
            if ( get_val(L_X)> +45){
               combo_stop(Auto_Aimm3)
      }
            if ( get_val(L_Y)< -45){
               combo_stop(Auto_Aimm3)
      }
            if ( get_val(L_Y)> +45){
               combo_stop(Auto_Aimm3)
      }
      if( abs(get_val(12))>60 || abs(get_val(11))>60){
 
 
 

     hold_time = 2 / RATE_OF_FIRE;
        rest_time = hold_time - 2;
        if(rest_time < 0) rest_time = 0;
    
     hold_time = 2 / RATE_OF_FIRE2;
        rest_time = hold_time - 2;
        if(rest_time < 0) rest_time = 0;
         
         hold_time = 2 / RATE_OF_FIRE3;
        rest_time = hold_time - 2;
        if(rest_time < 0) rest_time = 0;
          
          hold_time = 2 / RATE_OF_FIRE4;
        rest_time = hold_time - 2;
        if(rest_time < 0) rest_time = 0;
    
    if(get_val(17)){  
        if(event_press(18)) {
            RATE_OF_FIRE = RATE_OF_FIRE +2085;
        }
         RATE_OF_FIRE2 = RATE_OF_FIRE2 +200
        if(event_press(14)){
         RATE_OF_FIRE3 = RATE_OF_FIRE3 +100
          if(event_press(14)){
         RATE_OF_FIRE3 = RATE_OF_FIRE4 +100
         }
            RATE_OF_FIRE = RATE_OF_FIRE -800000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
        }
         RATE_OF_FIRE2 = RATE_OF_FIRE2 -800000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
        
        set_val(13,0);set_val(14,0);
    }
        
    if(get_val(scope_button) && event_press(2)) {
        set_pvar(SPVAR_1,RATE_OF_FIRE);
        set_val(2,0);
    }
     if(get_val(scope_button) && event_press(2)) {
        set_pvar(SPVAR_1,RATE_OF_FIRE2);
        set_val(2,0);
    }
    if(get_val(7)){
        if(event_press(RECOIL_UP)) {
            ANTI_RECOIL = ANTI_RECOIL+1;
        }
        if(event_press(RECOIL_DOWN)) {
            ANTI_RECOIL = ANTI_RECOIL -1;
        }
            set_val(RECOIL_UP,0);
            set_val(RECOIL_DOWN,0);
     
        if(event_press(17)){ 
            set_pvar(SPVAR_2, ANTI_RECOIL);
        }
    }
     if(!ONLY_WITH_SCOPE || get_val(scope_button)) {
        combo_run(AntiRecoil2);
        if (get_val(10) <-80) combo_stop (AntiRecoil2);
   }
   
    if(!ONLY_WITH_SCOPE || get_val(scope_button2)) {
        combo_run(AntiRecoil2);
        if (get_val(10) <-80) combo_stop (AntiRecoil2);
   }
   

    if(!ONLY_WITH_SCOPE || get_val(scope_button3)) {
        combo_run(AntiRecoil2);
        if (get_val(10) <-80) combo_stop (AntiRecoil2);
  
   }
   }
   
   
//-------------------------------------------------------------------------------------------

//COMBO BLOCKS
}
}
combo vibrate {
    set_rumble(RUMBLE_A, 100);
    wait(250);
    reset_rumble();
    }
    
combo RAPID_FIRE {
    set_val(fire_button, 100);
    wait(hold_time);
    set_val(fire_button, 0);
    wait(rest_time);
    set_val(fire_button, 0);
    }
    combo RAPID_FIRE2 {
    set_val(fire_button2, 100);
    wait(hold_time);
    set_val(fire_button2, 0);
    wait(rest_time);
    set_val(fire_button2, 0);
    }
    combo RAPID_FIRE3 {
    set_val(fire_button3, 100);
    wait(hold_time);
    set_val(fire_button3, 0);
    wait(rest_time);
    set_val(fire_button3, 0);
    }
     combo RAPID_FIRE4 {
    set_val(fire_button4, 100);
    wait(hold_time);
    set_val(fire_button4, 0);
    wait(rest_time);
    set_val(fire_button4, 0);
    }
    
combo Auto_Aimm {     
   set_val(R_Y,-25);//1                  
   wait(2)
   set_val(R_X,+25);//1 
   wait(2) 
   set_val(R_Y,+25);//1
   wait(2)                  
   set_val(R_X,-25);//1 
   wait(2)

                
}
combo Auto_Aimm1 {     
   set_val(R_Y,-20);//1                  
   wait(2)
   set_val(R_X,+20);//1 
   wait(2) 
   set_val(R_Y,+20);//1
   wait(2)                  
   set_val(R_X,-20);//1 
   wait(2)

            
}
combo Auto_Aimm2 {     
   set_val(L_Y,-20);//1                  
   wait(1)
   set_val(L_X,+20);//1 
   wait(1) 
   set_val(L_Y,+20);//1
   wait(2)                  
   set_val(L_X,-20);//1 
   wait(2)

                
}
combo Auto_Aimm3 {     
   set_val(L_Y,-15);//1                  
   wait(2)
   set_val(L_X,+15);//1 
   wait(2) 
   set_val(L_Y,+15);//1
   wait(2)                  
   set_val(L_X,-15);//1 
   wait(2)
}

combo anti_Recoil { // This combo must be the last one
        if(get_val(fire_button3)) {
        anti_recoil = get_val(10) + anti_recoil;
        if(anti_recoil > 100) anti_recoil = 100;
        set_val(10, anti_recoil);
        anti_recoil_left = get_val(9) -ANTI_RECOIL_LEFT;
        if(anti_recoil_left > 100) anti_recoil_left = 100;
        set_val(9, anti_recoil_left);
        anti_recoil_right = get_val(9) +ANTI_RECOIL_RIGHT;
        if(anti_recoil_right > 100) anti_recoil_right = 100;
        set_val(9, anti_recoil_right);
       }
       }

          
        
combo AntiRecoil2 { // This combo must be the last one
        if(get_val(fire_button2)) {
        anti_recoil = get_val(10) + ANTI_RECOIL2;
        if(anti_recoil > 100) anti_recoil = 100;
        set_val(10, anti_recoil);
        anti_recoil_left = get_val(9) -ANTI_RECOIL_LEFT;
        if(anti_recoil_left > 100) anti_recoil_left = 100;
        set_val(9, anti_recoil_left);
        anti_recoil_right = get_val(9) +ANTI_RECOIL_RIGHT;
        if(anti_recoil_right > 100) anti_recoil_right = 100;
        set_val(9, anti_recoil_right);
       }
       }
       
    



 
 
 
 
//===================//
///LED
//===================//
 
 
function colorled(a,b,c,d) {
    set_led(LED_1,a);
    set_led(LED_2,b);
    set_led(LED_3,c);
    set_led(LED_4,d);
}
  • Rating

    10 / 10 here !

    If you own a ps3 and prefer an xbox controller, or even use a keyboard and mouse, this is a must to remap your keyboard to a controller. Go buy it now you won't be disappointed !

  • Rating

    Amazing device

    If you're like me and love your PS4 controller but want to use an Xbox One GET THIS you won't be sorry.

  • Rating

    Worth every penny

    The controller feels and performs as it does on the xbox right there on my ps3, awesome job guys, and worth every penny !!!

  • Rating

    Amazing Macro combos

    tested Super Street Fighter IV Arcade Edition. I was able to perform normal & FADC combos with some characters like Ryu and Ken with a single click. Amazing.

  • Rating

    As good as a XIM

    If you are a pc gamer, that needs a pc solution for console, get yourself a ControllerMAX you will not regret it.

  • Rating

    KB & Mouse RULES!

    All I can say playing 10 minutes with ControllerMAX properly configured it felt better then PC....YES I said it even better then PC, it's that smooth.

  • Rating

    Six-Axis 360!

    WOW! I can finally get that six-axis awesomeness on my Xbox 360. The best money I ever spent.

  • Rating

    Beats all rapidfire mods

    I've tried the Intensafire, Godfather even the new Wolf controller. The ControllerMAX beats them hands down and no wires or soldering too. 5 Stars!

  • Rating

    Just perfect!

    I can't believe how much this can do for the price tag - it blew me away. Best controller upgrade ever.

  • Rating

    Hugh Thanks!

    Without your help I couldn't be playing Xbox, thanks guys.

  • Rating

    Wow!

    I have to say after reading the forums for Destiny Mouse and Keyboard setup I was flying into getting it set up in 20 minutes. It works outstanding! I'm more then satisfied and its worth every penny!

  • Rating

    Achievement Unlocked!

    Idle boosting Complete 150 Multiplayer games, James Cameron's Avatar. My friend said it would be hard, I laughed then linked him.

  • Rating

    A++!

    Now this is a company you can count on and trust...keep up the great work guys!

  • Rating

    What Disability?

    I would like to thank you for making the CronusMax. I have this problem hitting L3 and R3, and today that problem was fixed. I love the remap feature on the Cronus max. You made my life easier.

  • Rating

    Awesome stuff guys!

    Playing Forza 5 with my original MS 360 wireless wheel makes the XB1 complete for me, thanks to the CronusMax. Thumbs up!