GTA IV - RapidFire

Grand Theft Auto IV - Rapid Fire | INSTRUCTIONS: Hold SELECT , then press START to turn RAPIDFIRE ON / OFF. If RAPIDFIRE is ON the LED 4 goes on, LED 1 goes off. The opposite if RAPIDFIRE is OFF. RAPIDFIRE TRIGGER is PRESS SENSITIVITY , the RAPIDFIRE starts only when the TRIGGER is pressed 100%. Big Thanks to EOCDM for the help with timing.
VersionVer 1.00
Authorcarmine
Publish DateSun, 23 Mar 2014 - 15:16
Last UpdateSun, 23 Mar 2014 - 15:16
Downloads846
RATE


1

0

Code: Select all
/************************************************************************************************************************
*  Grand Theft Auto IV - Rapid Fire                                                                                     *
*                                                                                                                       *
*    INSTRUCTIONS:  Hold SELECT , then hold START to turn RAPIDFIRE  ON / OFF.                                          *
*                   If RAPIDFIRE is ON the LED 4 goes on, LED 1 goes off. The opposite if RAPIDFIRE is OFF.             *
*                   RAPIDFIRE TRIGGER is PRESS SENSITIVITY , the RAPIDFIRE starts only when the TRIGGER is pressed 100% *
*************************************************************************************************************************/

 
define RATE_OF_FIRE = 16.2;   // SPS Speed 
define RF = PS3_R2;           // RapidFire Trigger           
define INITIAL_STATE = FALSE; // Initial State of RapidFire Combo
define W1 = 31;               // HOLD_TIME of RapidFire Combo   
define W2 = 11;               // REST_TIME of RapidFire Combo     
 
int turbo_is_on = INITIAL_STATE;
 
main {
set_led(LED_1, 1);
set_led(LED_4, 0);
 
    if(get_val(PS3_SELECT) && event_press(PS3_START)) {
       turbo_is_on = !turbo_is_on;
    }
    if(turbo_is_on) {
       set_led(LED_1, 0);
       set_led(LED_4, 1);
    }
    if(turbo_is_on && get_val(RF) > 99 ){
        combo_run(RapidFire);
    } else if(combo_running(RapidFire)) {
        combo_stop(RapidFire);
    }
}
 
combo RapidFire {
    set_val(RF, 100);
    wait(W1);
    set_val(RF, 0);
    wait(W2);
    set_val(RF, 0);
}