COD: Ghosts Secondary auto-fire

The auto fire is activated by pressing Y, and desactivated by pressing Y again. This is useful for having a full auto as primary, so the auto-fire doesn´t disturb the fire. In case you die holding the secondary, you can press MENU (BACK) to disable the auto fire. The rate of fire can be adjusted by pressing MENU and START at the same time, and while holding them RB to make it faster and LB to do the opposite. This is my first Script, so there might be some things to improve, but it works fine. And the autofire is originally done for the 4th handgun (I can´t remember the name :3 ). And I think the rate of fire isn´t saved when you turn it off (I don´t know how to do it) -_-" Be free to make any improvement, and if you can fix the saving the rate of fire thing I would be grateful ;) Thanks everyone and don´t hesitate in contacting me ([email protected]) for anything :D
Publish DateMon, 24 Feb 2014 - 21:44
Last UpdateMon, 24 Feb 2014 - 21:44



Code: Select all
        /* *
        * GPC SCRIPT
        *  GPC is a scripting language with C-like syntax.
        *  To learn more access GPC Online Help on Help menu.
        * *********************************************************** */

        define DISPARAR     = XB1_RT;
        define SECUNDARIA   = XB1_Y;
        define SALTAR       = XB1_A;
        define LETAL        = XB1_RB;
        define ESPECIAL     = XB1_LB;
        define SELECT       = XB1_VIEW;
        define START        = XB1_MENU;
        int disparoRapidoEspera;
        int activado = 0;
        init {
            //set_pvar(SPVAR_12, 50); //+25
            disparoRapidoEspera = 80;
        main {
            if (activado == 0)
                activado = 1;
                activado = 0;
        activado = 0;
        if(get_val(START) && get_val(SELECT)){
            if (event_press(LETAL)){
                disparoRapidoEspera = disparoRapidoEspera + 1;
            if (event_press(ESPECIAL)){
                disparoRapidoEspera = disparoRapidoEspera - 1;
          if(get_val(DISPARAR) && (activado == 1)) {
          else {
            // The main procedure is called before every report be sent to
            // console, you can think in this procedure as a loop which only
            // ends when the script is unloaded.
            // TODO: handle/change values of buttons, analog stick and/or sensors
        combo AutoFire {
            set_val(DISPARAR, 100);
            set_val(DISPARAR, 0);