AN94 Anti recoil, using 4 sensitivity

anti recoil using 4 sensitivity for black ops 2
Version1.00
AuthorLGDZ x Moddurs
Publish DateFri, 30 May 2014 - 21:34
Last UpdateFri, 30 May 2014 - 21:34
Downloads342
RATE


0

4

Code: Select all
// GPC Online Library
// generic_antirecoil_script.gpc
/* *
* ANTI-RECOIL GPC SCRIPT
* *********************************************************** */

// Use Anti-recoil only when scoping
define ONLY_WITH_SCOPE = TRUE;
// Anti-recoil strongness
// Value range from 0 to 100
// Each weapon may need a specific value
define ANTI_RECOIL = 36;
//
// No need to make changes in the code below.
//
//
//  VARIABLES
// ---------------------------------------------------------
int fire_button, scope_button;
int anti_recoil;
//
//  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);
    }
}