GPC Library

forza horizon 3 speed

yea
Version 3.09
Author Kylespeed2
Publish Date 2017-05-07 00:15:33
Update Date 2017-05-07 00:15:33
Downloads 135
RATE


0

1

Release Notes: ccxcxx
Code:Select all
// GPC Online Library
// gta_v_last_try.gpc

// GPC Online Library
// antirecoil_complete_(vertical_+_horizontal)_and_rapidfire,_both_adjustable_on_the_fly,_with_on/off_and_save_function.gpc

//-------------------------------------------------------------------------------------------
//  ANTIRECOIL (Vertical + Horizontal) and RAPIDFIRE, both adjustable on the fly, with ON/OFF and SAVE function
//-------------------------------------------------------------------------------------------
//  Version: 5.0
//  Platform: Multi
//  Controller: Multi
//  Game: All FPS games
//  Author: LEX LOST
//-------------------------------------------------------------------------------------------
//               XBOX INSTRUCTIONS:
// RAPIDFIRE (ON by default - Start value: 950323)
// Hold LT and Press A to Enable or Disable Rapidfire (with rumble notify)
// Hold RT and HOLD UP to increase Rate of Fire (+9000 each tap on UP, while holding RT)
// Hold A and tap DOWN to decrease Rate of Fire (-9000 each tap on DOWN, while holding RT)
// Save Rate of Fire: Hold LT and press MENU (or START, for XBOX360 users)

// ANTIRECOIL (ON by default - Start value: vertical = 30; Horizontal = 0;)
// 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)
// Hold LT and tap RIGHT to compensate to the right (+1 each tap on RIGHT , while holding LT)
// Hold LT and tap LEFT to compensate to the left (-1 each tap on LEFT, while holding LT)
// Save Antirecoil: Hold LT and press Y

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

// ANTIRECOIL (ON by default - Start value: vertical = 30; Horizontal = 0;)
// 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)
// Hold L2 and tap RIGHT to compensate to the right(+1 each tap on RIGHT , while holding L2)
// Hold L2 and tap LEFT to compensate to the right (-1 each tap on LEFT, while holding L2)
// Save Antirecoil: Hold L2 and press TRIANGLE

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

//DECLARARATIONS - define

define AR_Release = 70; // change this value to determine when antirecoil stops working (min: antirecoil value)
define ONLY_WITH_SCOPE = TRUE; // if TRUE Antirecoil IS ON only when scoping

define Brake = 7; // Change for different layout
define Speed = 20;// ABS speed 
 
define RECOIL_UP = 13;     
define RECOIL_DOWN = 14;   
define RECOIL_LEFT  = 15; 
define RECOIL_RIGHT = 16;  
    define LT   = XB1_LT;
    define RT   = XB1_RT;
    define RX   = XB1_RX;                              
    define RY   = XB1_RY;
 define LX           = XB1_LX;                              
define LY           = XB1_LY;


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

//VARIABLES - int
int value   = 33;
    int value2  = -33;
    int delay   = 1;
int fire_button;
int scope_button;
int hold_time;
int rest_time;
int recoil_onoff = FALSE; // 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 = 950323; //Range: 1 to 2500000000000000000000000 RPS (Round/s)
int ANTI_RECOIL = 30;
int ANTI_RECOIL_H = 0;  
int anti_recoil;
int anti_recoil_H;
int prev_gear, loop_gear;  // utilized by J2Kbr's shifter code
int wheelSlop = 8;  // accounts for slop in steering wheel (deadzone) : 0 would be NO dead zone (very twitchy)
int eBrake = 0;
int lineLockActivation = 0;
int brakePerc = 20;  // default is 20 ; utilized by Line Lock function


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

//INITIALIZATION - init

init{

    if(get_console() == PIO_PS3) {
        fire_button = 3;
        scope_button = 6;
    }else { 
        fire_button = 4;
        scope_button = 7;
    }
    RATE_OF_FIRE = get_pvar(SPVAR_1,0, 250, 950323);
    ANTI_RECOIL = get_pvar(SPVAR_2,0,100,30);
    ANTI_RECOIL_H = get_pvar(SPVAR_3,0,100,0);
}

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

//MAIN BLOCK ROUTINES

main { 
    if(get_val(7)  && event_press(34))  {
        combo_run(vibrate); recoil_onoff=!recoil_onoff;
        } 
    if(get_val(7)) {if(event_press(34))  {
        combo_run(vibrate);rapid_onoff=!rapid_onoff;}
        }    
    if(rapid_onoff) {if(get_val(4)) {combo_run(RAPID_FIRE);
        } 
    }
     // Steering Dead Zone Adjustment
    if(get_val(XB1_LX) < inv(wheelSlop) )
        set_val(XB1_LX, ((get_val(XB1_LX) * 7) / 9) - 23);

    else if( get_val( XB1_LX ) > wheelSlop )
        set_val( XB1_LX , (( get_val( XB1_LX ) * 7) / 9) + 23);

    else 
        set_val( XB1_LX, get_val (XB1_LX ) );

    // END: Steering Dead Zone Adjustment
    
    // Pedal Manager:  Contains code to maintain Clutch, Accelerator and Brake Pedals
    pedalManager();
    
    // Line Lock - Button-activated braking; useful for burnouts - Mapped to Button 3
    lineLock();
    
    deactivateBtns();

    // Shifter Manager:  Contains code to manage 6-speed shifter
    shifterManager();
    
   
        hold_time = 500 / RATE_OF_FIRE;
        rest_time = hold_time - 500;
        if(rest_time < 0) rest_time = 0;
        if(get_val(XB1_RX))
    sensitivity(XB1_RX, 40, 130);
    sensitivity(XB1_RY, 65, 130);
    deadzone(XB1_RX,XB1_RY,0,0);
    stickize(XB1_RX,XB1_RY, 110);

if(get_val(XB1_LX))
    sensitivity(XB1_LX, 40, 130);
    sensitivity(XB1_LY, 65, 130);
    deadzone(XB1_LX,XB1_LY,0,0);
    stickize(XB1_LX,XB1_LY, 110);

    
        if(get_val(LT)) {
            combo_run(LT_C);
        }
 
        if(get_val(RT) && get_val(LT)) {
            combo_stop(LT_C);
            combo_run(RT_C);
        }
 
        if(get_val(RX) < value2 || get_val(RX) > value || get_val(RY) < value2 || get_val(RY) > value || get_val(RX) < value2 || get_val(RX) > value || get_val(RY) < value2 || get_val(RY) > value) {
            combo_stop(LT_C);
            combo_stop(RT_C);
            }
         if(get_val(LX) < value2 || get_val(LX) > value || get_val(LY) < value2 || get_val(LY) > value || get_val(LX) < value2 || get_val(LX) > value || get_val(LY) < value2 || get_val(LY) > value) {
            combo_stop(LT_C);
            combo_stop(RT_C);
        }
 
    
    if(get_val(4)){  
        if(get_val(13)){
            RATE_OF_FIRE = RATE_OF_FIRE +9000;
        }
        if(get_val(14)){
            RATE_OF_FIRE = RATE_OF_FIRE -9000;
        }
        set_val(13,0);set_val(14,0);
    }
        
    if(get_val(scope_button) && event_press(4)){
        set_pvar(SPVAR_1,RATE_OF_FIRE);
        set_val(4,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(RECOIL_LEFT)){
            ANTI_RECOIL_H = ANTI_RECOIL_H + 1;
        }
        if(event_press(RECOIL_RIGHT)) {
            ANTI_RECOIL_H = ANTI_RECOIL_H - 1;
        }
        set_val(RECOIL_LEFT,0);
        set_val(RECOIL_RIGHT,0);
   
        if(event_press(17)){ 
        set_pvar(SPVAR_2, ANTI_RECOIL);
        set_pvar(SPVAR_3, ANTI_RECOIL_H);
        }
    }
    if(!ONLY_WITH_SCOPE || get_val(scope_button) && get_val(fire_button )) {
        combo_run(AntiRecoil);
    }
    if ((get_val(10) <-AR_Release) || (get_val(10) > AR_Release) || (get_val(9) <-AR_Release) || (get_val(9) > AR_Release)) {
                combo_stop (AntiRecoil);
    }
}
//-------------------------------------------------------------------------------------------

//COMBO BLOCKS

combo vibrate   {
    set_rumble(RUMBLE_A, 100);
    wait(300);
    reset_rumble();
    }

combo RAPID_FIRE {
    set_val(fire_button, 100);
    wait(hold_time);
    set_val(fire_button, 100);
    wait(rest_time);
    set_val(fire_button, 100);
    }
      combo LT_C {
       set_val(RY, -25);          
       wait(delay)
       set_val(RX, 25); 
       set_val(RY, 15); 
       wait(delay) 
       set_val(RY, 15); 
       wait(delay)                  
       set_val(RX, -25);
       set_val(RY, 15);
       wait(delay)
       set_val(LY, -25);          
       wait(delay)
       set_val(LX, 25); 
       set_val(LY, 15); 
       wait(delay) 
       set_val(LY, 15); 
       wait(delay)                  
       set_val(LX, -25);
       set_val(LY, 15);
       wait(delay)
    }
    
 
    combo RT_C {
       set_val(RY, -35);              
       wait(delay)
       set_val(RX, 35);
       set_val(RY, 25);
       wait(delay) 
       set_val(RY, 25);
       wait(delay)                  
       set_val(RX, -35);
       set_val(RY, 25);
       wait(delay)
       set_val(LY, -35);              
       wait(delay)
       set_val(LX, 35);
       set_val(LY, 25);
       wait(delay) 
       set_val(LY, 25);
       wait(delay)                  
       set_val(LX, -35);
       set_val(LY, 25);
       wait(delay)
    }
    combo AntiRecoil { // This combo must be the last one
    if(recoil_onoff) {
    anti_recoil = get_val(10) + ANTI_RECOIL;
    if(anti_recoil > 100) anti_recoil = 100;
    set_val(10, anti_recoil);
    anti_recoil_H = get_val(9) +ANTI_RECOIL_H;
    if(anti_recoil_H > 100) anti_recoil_H = 100;
    set_val(9, anti_recoil_H);
    }
} // End 
  
combo gearDOWN // Written by: J2Kbr
{
    set_val(XB1_LB, 100);
    wait(50);
    set_val(XB1_LB, 0);
    wait(40);
    set_val(XB1_LB, 0);
}

combo gearUP // Written by: J2Kbr
{
    set_val(XB1_RB, 100);
    wait(50);
    set_val(XB1_RB, 0);
    wait(40);
    set_val(XB1_RB, 0);
}


function deactivateBtns()  // Essentially 'deactivates' these inputs by not allowing the controller to change their value as we're utilizing their inputs elsewhere in the script.
{
    set_val(XB1_LS,0);
    set_val(XB1_RS,0);
    set_val(XB1_LY,0);
    set_val(XB1_RX,0);    

    // added 3/1/2015: when line lock is active, disable the usage of up and down buttons in the game itself (avoids the constant switching between standard and detailed info. display)
    if( lineLockActivation == 1 )
    {
            set_val( XB1_UP, 0);
            set_val( XB1_DOWN, 0);
    }
}

function pedalManager() // Properly addresses Accelerator, Brake, and Clutch (and Emergency Brake)
{    
    // Accelerator Pedal
    set_val(XB1_RT, inv((get_val(XB1_RT))/2) + 700);

    // Brake Pedal
    set_val(XB1_RT, inv((get_val(XB1_RT))/2) + 700);

    // Emergency Brake - Map using CEMU_EXTRA9
    if( event_press( CEMU_EXTRA9) )  // EBrake and Clutch are on same Axis, must check for button press first
    {
        eBrake = 1;
    }
    if (event_release (CEMU_EXTRA9) )
        eBrake = 0;

    // Clutch Pedal - Check to see if E Brake has been activated first
    if( eBrake == 0 )
    {
        // Clutch and E Brake share the right analog stick's Y axis
        if(get_val(XB1_RY) < 0)
            set_val(XB1_RY, (get_val(XB1_RY)/2)-50);
        else if(get_val(XB1_RY) >= 0)
            set_val(XB1_RY, (get_val(XB1_RY)-100)/2);
    }
    // Activate Emergency Brake
    else
        set_val(XB1_RY, 100);
}

function lineLock() // Burnouts!
{
    // Line Lock - Applies braking force to vehicle (default is 20%) ; mapped to Button 3 on shifter
    //               Braking force is adjustable while Line Lock button is activated/pressed.
    //             Pressing Up on D-Pad while activated increases braking effectiveness.
    //               Pressing Down on D-Pad while activated decreases braking effectiveness.
    //             Pressing Button 1 while activated will reset the line lock to default of 20%
    //             Default: 20 ; Minimum: 0 ; Maximum : 100

    if( event_press( XB1_RS) )
        lineLockActivation = 1;
    if( event_release( XB1_RS) )
        lineLockActivation = 0;

    if( lineLockActivation == 1 )
    {
        if( event_press( XB1_UP) && brakePerc < 100 )
            brakePerc = brakePerc + 1;
        if( event_press( XB1_DOWN) && brakePerc > 0 )
            brakePerc = brakePerc - 1;
        if( event_press( XB1_LS) )
            brakePerc = 20;

        set_val(XB1_LT, brakePerc);
        
    }

}

function shifterManager() // Written by: J2Kbr
{
    // Reverse
    if( event_press(CEMU_EXTRA1) ) 
        loop_gear = loop_gear + 1 - prev_gear;
    else if( event_release(CEMU_EXTRA1 ))
        prev_gear = 1;

    // 1st Gear
    if( event_press(CEMU_EXTRA2) )
        loop_gear = loop_gear + 2 - prev_gear;
    else if( event_release(CEMU_EXTRA2) )
        prev_gear = 2;

    // 2nd Gear
    if( event_press(CEMU_EXTRA3) )
        loop_gear = loop_gear + 3 - prev_gear;
    else if( event_release(CEMU_EXTRA3) )
        prev_gear = 3;

    // 3rd Gear
    if( event_press(CEMU_EXTRA4) )
        loop_gear = loop_gear + 4 - prev_gear;
    else if( event_release(CEMU_EXTRA4) )
        prev_gear = 4;

    // 4th Gear
    if( event_press(CEMU_EXTRA5) )
        loop_gear = loop_gear + 5 - prev_gear;
    else if( event_release(CEMU_EXTRA5) )
        prev_gear = 5;

    // 5th Gear
    if( event_press(CEMU_EXTRA6) )
        loop_gear = loop_gear + 6 - prev_gear;
    else if( event_release(CEMU_EXTRA6) )
        prev_gear = 6;

    // 6th Gear
    if( event_press(CEMU_EXTRA7) )
        loop_gear = loop_gear + 7 - prev_gear;
    else if( event_release(CEMU_EXTRA7) )
        prev_gear = 7;

    // Press the LB or RB button to change the gear based on H-Shifter
    if(!combo_running(gearUP) && !combo_running(gearDOWN)) 
    {
        if(loop_gear > 0) 
        {
            loop_gear = loop_gear - 1;
            combo_run(gearUP);
        } 
        else if(loop_gear < 0) 
        {
            loop_gear = loop_gear + 1;
            combo_run(gearDOWN);
        }
    }
}






  • 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!