Grand Theft Auto V

Grand Theft Auto V with rapid fire on PS3 R2. Tap select button to toggle rapid fire on/off. You also have the ability to increase or decrease the rate of fire using Dpad up to increase and Dpad down to decrease. Default rate of fire starts at 15 and the maximum is at 25. Enjoy!!
Version1.04
AuthorBaby Cham
Publish DateTue, 4 Feb 2014 - 01:03
Last UpdateTue, 4 Feb 2014 - 01:03
Downloads409
RATE


2

0

Code: Select all
/* =============================================================================
 * Game:          GRAND*THEFT*AUTO*V
 * System:        Playstation 3
 * Controller:    Dualshock 3
 * Game Settings: Default
**/

 
/* ---------------------------------------------------------------------
*  DEFINES
**/

define RAPIDFIRE_BUTTON = PS3_R2;
define TURONOFF_BUTTON  = PS3_SELECT;
define INCREASE_BUTTON  = PS3_UP;
define DECREASE_BUTTON  = PS3_DOWN;
 
define INITIAL_RATE     = 15;   // Range: 1 to 25 RPS (Round/s)
define INITIAL_STATE    = TRUE; // TRUE to start with RapidFire ON, FALSE otherwise
 
/* ---------------------------------------------------------------------
*  VARIABLES
**/

// No need to make changes in the code below.
//
int hold_time, rest_time;
int rate_of_fire = INITIAL_RATE;
int rapidfire_is_on = INITIAL_STATE;
 
/* ---------------------------------------------------------------------
*  INITIALIZATION
**/

init {
    combo_run(UpdateRateOfFire);
}
 
/* -----------------------------------------------------------------------------
 *  MAIN
**/

main {
    if(event_press(INCREASE_BUTTON)) {
        rate_of_fire = rate_of_fire + 1;
        if(rate_of_fire > 25) rate_of_fire = 25;
        combo_run(UpdateRateOfFire);
    }
    set_val(INCREASE_BUTTON, 0);
 
    if(event_press(DECREASE_BUTTON)) {
        rate_of_fire = rate_of_fire - 1;
        if(rate_of_fire < 1) rate_of_fire = 1;
        combo_run(UpdateRateOfFire);
    }
    set_val(DECREASE_BUTTON, 0);
 
    if(event_release(TURONOFF_BUTTON) && get_ptime(TURONOFF_BUTTON) < 200) {
        rapidfire_is_on = !rapidfire_is_on;
    }
    block(TURONOFF_BUTTON, 200);
 
    if(rapidfire_is_on && get_val(RAPIDFIRE_BUTTON)) {
        combo_run(RapidFire);
    } else if(combo_running(RapidFire)) {
        combo_stop(RapidFire);
    }
 
    //Pressing L2 increases sensitivity.
    if(get_val(PS3_L2)) {
        set_val(PS3_L2, 100);
    }
 
    //Pressing L1 increases sensitivity.
    if(get_val(PS3_L1)) {
        set_val(PS3_L1, 100);
    }
 
    //Pressing R1 increases sensitivity.
    if(get_val(PS3_R1)) {
        set_val(PS3_R1, 100);
    }
 
    //Pressing SQUARE increases sensitivity.
    if(get_val(PS3_SQUARE)) {
        set_val(PS3_SQUARE, 100);
    }
 
    //Pressing TRIANGLE increases sensitivity.
    if(get_val(PS3_TRIANGLE)) {
        set_val(PS3_TRIANGLE, 100);
    }
 
    //Pressing CIRCLE increases sensitivity.
    if(get_val(PS3_CIRCLE)) {
        set_val(PS3_CIRCLE, 100);
    }
 
    //Pressing CROSS increases sensitivity and run as rapid fire.
    if(get_val(PS3_CROSS)) {
        combo_run(RapidFireCross);
    }
 
    if(get_val(PS3_RX))
        sensitivity(PS3_RX, 40, 130);
        sensitivity(PS3_RY, 65, 130);
        deadzone(PS3_RX, PS3_RY, 0, 0);
        stickize(PS3_RX, PS3_RY, 110);
    }
 
/* -----------------------------------------------------------------------------
 *  COMBOS
**/

combo UpdateRateOfFire {
    hold_time = 500 / rate_of_fire;
    rest_time = hold_time - 20;
    if(rest_time < 0) rest_time = 0;
    set_val(TRACE_1, rate_of_fire);
}
 
combo RapidFire {
    set_val(RAPIDFIRE_BUTTON, 100);
    wait(hold_time);
    set_val(RAPIDFIRE_BUTTON, 0);
    wait(rest_time);
    set_val(RAPIDFIRE_BUTTON, 0);
}
 
combo RapidFireCross {
    set_val(PS3_CROSS, 100);
    wait(20);
    set_val(PS3_CROSS, 0);
    wait(10)
    set_val(PS3_CROSS, 0);
}