No Recoil

Features verticle and horizontal adjustments
Version1.00
Authorhackmaster3282
Publish DateSat, 6 Sep 2014 - 08:01
Last UpdateSat, 6 Sep 2014 - 08:01
Downloads2416
RATE


7

0

Code: Select all
// GPC Online Library
// multiplatform_complete_antirecoil.gpc
 
 /* * 
    ANTI-RECOIL VERTICAL + HORIZONTAL (LEFT + RIGHT)
 
    Author:     Hackmaster3282                     
    System:     MULTI
    Controller: MULTI - Optimized for MOUSE & KEYBOARD
    GAME:       Battlefield series - COD series - Black Ops series
 
    ************************************************************/

 
    define ONLY_WITH_SCOPE = TRUE;// Use Anti-recoil only when scoping
    define ANTI_RECOIL = 0;       //change "0" to compensate vertical recoil (0 - 100)
    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)
 
    //  VARIABLES
    // ---------------------------------------------------------
    int fire_button, scope_button;
    int anti_recoil;
    int anti_recoil_left;
    int anti_recoil_right;
 
    //  INITIALIZATION
    // ---------------------------------------------------------
    init {
        if(get_console() == PIO_PS3) { // PS3 Trigger & Bumper
            fire_button = 3;
            scope_button = 6;
        } else {                       // Natural Trigger & Bumper
            fire_button = 4;
            scope_button = 7;
        }
    }
    //  MAIN PROCEDURE
    // ---------------------------------------------------------
    main {
        if(!ONLY_WITH_SCOPE || get_val(scope_button)) {
            combo_run(AntiRecoil);
        }
    }
    //  COMBOS
    // ---------------------------------------------------------
    combo AntiRecoil { // This combo must be the last one
        if(get_val(fire_button)) {
        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);
        }
    }