Grand Theft Auto V - Easy Sprint Script

Documentation, usage tips and configuration guides for Titan Two scripts and bytecodes published by the community users.

Grand Theft Auto V - Easy Sprint Script

Postby pablosscripts » Wed Nov 30, 2016 4:52 pm

Image

ABOUT:

I've studied literally every GTA V script released on Titan One before designing this. I found pretty much all of them were lacking in the following ways:

Feature 1: In all the other scripts I studied, Easy Sprint always needs to be initiated via a button press. Why not make it automatic? The reason most scripts make you activate Easy Sprint manually is because it conflicts with a number of things, for example you don't want it to activate while you are driving, or if you are taking cover, or navigating the menu. Automatically pressing sprint conflicts with these actions so I can understand why people have programmed it like this, but there is a better way. I've decided to flip it around - in my script, you will sprint automatically, and then it is designed to deactivate when you are driving or taking cover. The script will handle this for you automatically so you don't need to worry about it. It is much more intuitive and comfortable to play this way.

Feature 2: Most Easy Sprint scripts don't support 360 degree movement. You can only sprint when walking forward, but not left, right or towards the screen. My script supports full 360 degree sprinting.


OTHER FEATURES:

Feature 3: Extended carjack - I have found that when you are driving, if you need to bail out of the car, the button press doesn't always register, especially if you are driving fast. I have made it so the script will hold down the carjack button for a little longer even if you have tapped it very briefly. Now it's not always perfect because the game is a bit weird sometimes, but my script makes it much more reliable than before.

Feature 4: Extended lookback - similar to above, I have found that there is a lot of input lag when looking back (RS / R3). Sometimes I like to quickly tap the stick to look behind but it doesn't register. I have made it so the script will hold down the lookback button for a little longer even if you have tapped it very briefly.


IMPORTANT SETUP NOTES:

Go to options and navigate to: Settings > Controls, and then change:

  • Third Person Control Type to "Standard First Person 2" (don't confuse this with "Standard First Person")
  • First Person Control Type to "Standard First Person 2" (don't confuse this with "Standard First Person")

These controls may seem a little weird at first, but my script requires the Sprint button to be assigned to the RB / R1 button as I have found it is more reliable when it comes to scripting for Easy Sprint (I have no idea why...!).


CONTROLS:

    SPRINTING: Sprinting is automatic, but if you have just exited a vehicle or have taken cover, and you want to break into a sprint again, you can do this by moving the left analogue stick in ANY direction and then tap the RB / R1 button.

    JOGGING: If you would like to jog instead of sprint, hold down the RB / R1 button. Once you have maxed out your stamina (which enables infinite sprint), you will never need this again. It only takes about 20 minutes of running around to max our your stamina.

    WALKING: If you would like to walk, double tap the crouch button (LS / L3).
Setup: XIM Apex, T2, K780 keyboard, G Pro Wireless mouse, SteelSeries 4HD pad, DXRacer armrest, LucidSound LS30 headset, Netduma router, Ubiquiti UniFi AP LR

My R6 script: https://youtu.be/x-9NtxyySVM
User avatar
pablosscripts
Brigadier General
Brigadier General
 
Posts: 1976
Joined: Tue Nov 24, 2015 6:27 am

Re: Grand Theft Auto V - Easy Sprint Script

Postby J2Kbr » Thu Dec 01, 2016 1:56 pm

I always get amazed how good and detailed you make your instructions!! Not to mention the code comments in your scripts, always very comprehensive. I wish be able to write as easy as you do.
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: Grand Theft Auto V - Easy Sprint Script

Postby pablosscripts » Thu Dec 01, 2016 2:19 pm

Thanks! Yeah I spend a lot of time on commenting so I can remember what everything does!
Setup: XIM Apex, T2, K780 keyboard, G Pro Wireless mouse, SteelSeries 4HD pad, DXRacer armrest, LucidSound LS30 headset, Netduma router, Ubiquiti UniFi AP LR

My R6 script: https://youtu.be/x-9NtxyySVM
User avatar
pablosscripts
Brigadier General
Brigadier General
 
Posts: 1976
Joined: Tue Nov 24, 2015 6:27 am

Re: Grand Theft Auto V - Easy Sprint Script

Postby Prototype » Fri Dec 02, 2016 2:32 pm

Nice script, awesome to use :joia:
pablogroup wrote:JOGGING: If you would like to jog instead of sprint, hold down the LB / L1 button.

Don't you mean RB / R1?
Code: Select all
#define SPRINT                  XB1_RB
Console tuner since my 1st controller.
Scripting, a game in the game.
Believe or dare, It's Titanic! :smile0517:
User avatar
Prototype
Major General
Major General
 
Posts: 3252
Joined: Sun Dec 16, 2012 1:43 pm

Re: Grand Theft Auto V - Easy Sprint Script

Postby pablosscripts » Fri Dec 02, 2016 2:43 pm

prototype wrote:Nice script, awesome to use :joia:
pablogroup wrote:JOGGING: If you would like to jog instead of sprint, hold down the LB / L1 button.

Don't you mean RB / R1?
Code: Select all
#define SPRINT                  XB1_RB



Ah crap you're right I'll have to fix that thanks!
Setup: XIM Apex, T2, K780 keyboard, G Pro Wireless mouse, SteelSeries 4HD pad, DXRacer armrest, LucidSound LS30 headset, Netduma router, Ubiquiti UniFi AP LR

My R6 script: https://youtu.be/x-9NtxyySVM
User avatar
pablosscripts
Brigadier General
Brigadier General
 
Posts: 1976
Joined: Tue Nov 24, 2015 6:27 am

Re: Grand Theft Auto V - Easy Sprint Script

Postby pablosscripts » Fri Dec 02, 2016 3:00 pm

Oh man I just found errors all over my instructions. hahaha!! It's because I rarely play with a controller, I use a mouse 99% of the time, this is the only game I play using a controller. I never know the damn button names lol
Setup: XIM Apex, T2, K780 keyboard, G Pro Wireless mouse, SteelSeries 4HD pad, DXRacer armrest, LucidSound LS30 headset, Netduma router, Ubiquiti UniFi AP LR

My R6 script: https://youtu.be/x-9NtxyySVM
User avatar
pablosscripts
Brigadier General
Brigadier General
 
Posts: 1976
Joined: Tue Nov 24, 2015 6:27 am

pablo can you convert this to t2

Postby Bushido_24 » Mon May 28, 2018 2:53 pm

Code: Select all
 
 
/* ** GTA 5 Script
*
* TOGGLES:
* RAPID FIRE - SQUARE + DOWN
* SPRINT - SQUARE + LEFT
* AUTO AIM - SQUARE + RIGHT
* ANTI-RECOIL - SQUARE + UP
* ARM WRESTLING -  L3 + R3
* *********************************************************** */

 
 
define RATE_OF_FIRE   = 13; //  1 to 25 RPS (Round/s)
define ANTI_RECOIL    = -25;
define FIRE_BUTTON    = PS4_R2;
define SPRINT_BUTTON  = PS4_CROSS;
define AIM_BUTTON     = PS4_L2;
define time_to_dblclick  = 300;// time for second click to occur
int hold_time;
int rest_time;
int anti_recoil;
int sprint;
int walk;
int ActivateRapidFire   = TRUE//FALSE
int ActivateSprint      = TRUE//FALSE
int ActivateAIM         = TRUE//FALSE
int ActivateAntiRecoil  = TRUE//FALSE
int ActivateWrestling   = FALSE//TRUE
int dbl_time2;
int dbl_time ;
int timer;
 
 
int rumble_type;
 
 
 
init {
    colorled(0,0,3,0);
    hold_time = 500 / RATE_OF_FIRE;
    rest_time = hold_time - 20;
    if(rest_time < 0) rest_time = 0;
}
 
 
main {
//set_val(TRACE_1,ActivateRapidFire);
//set_val(TRACE_2,ActivateSprint);
//set_val(TRACE_3,ActivateAIM);
//set_val(TRACE_4,ActivateAntiRecoil);
//set_val(TRACE_5,ActivateWrestling);
 
 
//===================//
///TOGGLES
//===================//
 
 
     if(get_val(PS4_SQUARE))
     {
          if(event_release(PS4_DOWN))
          {
              ActivateRapidFire = !ActivateRapidFire;
            if(ActivateRapidFire) combo_run(Rumble_Activated);
            else combo_run(Rumble_Deactivated);
          }
 
 
          if(event_release(PS4_RIGHT))
          {
              ActivateAIM = !ActivateAIM;
            if(ActivateAIM) combo_run(Rumble_Activated);
            else combo_run(Rumble_Deactivated);
          }
 
 
          if( event_release(PS4_UP))
          {
              ActivateAntiRecoil = !ActivateAntiRecoil;
            if(ActivateAntiRecoil) combo_run(Rumble_Activated);
            else combo_run(Rumble_Deactivated);
          }
     }
 
     ///////////////////////////////////////////////////////////
     //
     if(get_val(PS4_L3) && event_release(PS4_R3))
     {
         ActivateWrestling = !ActivateWrestling;
        if(ActivateWrestling) combo_run(Rumble_Activated);
        else combo_run(Rumble_Deactivated);
     }
 
 
 
//===================//
///COMMANDS
//===================//
 
 
    //ROLL
    if(event_press(PS4_SQUARE) && dbl_time2<=0){
          dbl_time2 = 300;
 
    }else if(event_press(PS4_SQUARE) && dbl_time2){
          combo_run(Roll)
    }
    if(dbl_time2) dbl_time2 = dbl_time2 - get_rtime();
 
 
 
 
    //RAPID-FIRE
    if(ActivateRapidFire)
    {
        if(get_val(FIRE_BUTTON)) {
            combo_run(RapidFire);
        } else if(combo_running(RapidFire)) {
            combo_stop(RapidFire);
        }
    }
 
    //SPRINT
       if( abs(get_val(12))>60 || abs(get_val(11))>60){
 
 
            if(event_press(PS4_CROSS) && dbl_time<=0){
                 dbl_time = 300;
 
 
                 if(walk == 0) walk = 1;
                 else if(walk == 1) walk = 0;
                 else if(walk == 2) walk = 0;
 
            }else if(event_press(PS4_CROSS) && dbl_time){
                   walk = 2;
            }
             if(dbl_time) dbl_time = dbl_time - get_rtime();
 
 
            if(walk == 2)
            {
               combo_run(SPRINT);
            }
            else if(walk == 1)
            {
                 set_val(PS4_CROSS,100);
            }
 
      }
      else {
           sprint = FALSE;
           walk = FALSE;
      }
 
         //Stop SPRINT when either triggers are pressed.
        if(combo_running(SPRINT) && get_val(4) || get_val(7)) { 
            combo_stop(SPRINT);
        }
 
         //AIM
        if(ActivateAIM)
        {
            if(get_val(AIM_BUTTON))
            {
                if(!combo_running(Aim))
                combo_run(Aim);
            }  else if(combo_running(Aim))
 
                combo_stop(Aim);
 
        }
        //Anti-Recoil
        if(ActivateAntiRecoil)
        {
            if(get_val(FIRE_BUTTON))
            {
                combo_run(AntiRecoil);
            } else if(combo_running(AntiRecoil))
            {
                combo_stop(AntiRecoil);
            }
        }
 
        //Wrestling
        if(ActivateWrestling)
           combo_run(Wrestling);
        else if(combo_running(Wrestling))
           combo_stop(Wrestling);
 
 
           //Stop WRESTLING when either triggers are pressed.
        if(combo_running(Wrestling) && get_val(4) || get_val(7)) {
            combo_stop(Wrestling);
        }
 
}
//===================//
///COMBOS
//===================//
 
 
 
 
combo Rumble_Activated
{
      set_rumble(RUMBLE_A, 100);
      set_rumble(RUMBLE_B, 100);
      wait(200)
      reset_rumble()
}
combo Rumble_Deactivated
{
      set_rumble(RUMBLE_A, 100);
      set_rumble(RUMBLE_B, 100);
      wait(600)
      reset_rumble()
}
 
 
combo RapidFire {
    set_val(FIRE_BUTTON, 100);
    wait(hold_time);
    set_val(FIRE_BUTTON, 0);
    wait(rest_time);
    set_val(FIRE_BUTTON, 0);
    }
 
combo SPRINT {
    set_val(PS4_CROSS,100);
    wait(50);
    set_val(PS4_CROSS0);
    wait(50);
}
 
 
combo Roll {
    set_val(PS4_L2, 100);
    wait(50);
    set_val(PS4_SQUARE, 100);
    wait(50);
    set_val(PS4_SQUARE, 100)
    wait(50);
    set_val(PS4_L2, 0);
 
    }
 
 
combo Aim{
    set_val(AIM_BUTTON, 100);
    wait(300);
    set_val(AIM_BUTTON, 0);
    wait(01);
    set_val(AIM_BUTTON, 0);
}
 
 
combo AntiRecoil {
        anti_recoil = get_val(10) + ANTI_RECOIL;
        if(anti_recoil < -100) anti_recoil = -100;
        set_val(10, anti_recoil);
}
 
 
combo Wrestling {
    set_val(PS4_LX, 100);
    wait(40);
    set_val(PS4_LX, -100);
    wait(40);
}
 
 
 
 
//===================//
///FUNCTIONS
//===================//
 
 
 
//===================//
///LED
//===================//
 
 
function colorled(a,b,c,d) {
    set_led(LED_1,a);
    set_led(LED_2,b);
    set_led(LED_3,c);
    set_led(LED_4,d);
}
User avatar
Bushido_24
Sergeant First Class
Sergeant First Class
 
Posts: 22
Joined: Mon Jan 16, 2017 10:57 pm
Location: Florida

Re: pablo can you convert this to t2

Postby Sillyasskid » Mon May 28, 2018 4:38 pm

Bushido_24 wrote:
Code: Select all
 
 
/* ** GTA 5 Script
*
* TOGGLES:
* RAPID FIRE - SQUARE + DOWN
* SPRINT - SQUARE + LEFT
* AUTO AIM - SQUARE + RIGHT
* ANTI-RECOIL - SQUARE + UP
* ARM WRESTLING -  L3 + R3
* *********************************************************** */

 
 
define RATE_OF_FIRE   = 13; //  1 to 25 RPS (Round/s)
define ANTI_RECOIL    = -25;
define FIRE_BUTTON    = PS4_R2;
define SPRINT_BUTTON  = PS4_CROSS;
define AIM_BUTTON     = PS4_L2;
define time_to_dblclick  = 300;// time for second click to occur
int hold_time;
int rest_time;
int anti_recoil;
int sprint;
int walk;
int ActivateRapidFire   = TRUE//FALSE
int ActivateSprint      = TRUE//FALSE
int ActivateAIM         = TRUE//FALSE
int ActivateAntiRecoil  = TRUE//FALSE
int ActivateWrestling   = FALSE//TRUE
int dbl_time2;
int dbl_time ;
int timer;
 
 
int rumble_type;
 
 
 
init {
    colorled(0,0,3,0);
    hold_time = 500 / RATE_OF_FIRE;
    rest_time = hold_time - 20;
    if(rest_time < 0) rest_time = 0;
}
 
 
main {
//set_val(TRACE_1,ActivateRapidFire);
//set_val(TRACE_2,ActivateSprint);
//set_val(TRACE_3,ActivateAIM);
//set_val(TRACE_4,ActivateAntiRecoil);
//set_val(TRACE_5,ActivateWrestling);
 
 
//===================//
///TOGGLES
//===================//
 
 
     if(get_val(PS4_SQUARE))
     {
          if(event_release(PS4_DOWN))
          {
              ActivateRapidFire = !ActivateRapidFire;
            if(ActivateRapidFire) combo_run(Rumble_Activated);
            else combo_run(Rumble_Deactivated);
          }
 
 
          if(event_release(PS4_RIGHT))
          {
              ActivateAIM = !ActivateAIM;
            if(ActivateAIM) combo_run(Rumble_Activated);
            else combo_run(Rumble_Deactivated);
          }
 
 
          if( event_release(PS4_UP))
          {
              ActivateAntiRecoil = !ActivateAntiRecoil;
            if(ActivateAntiRecoil) combo_run(Rumble_Activated);
            else combo_run(Rumble_Deactivated);
          }
     }
 
     ///////////////////////////////////////////////////////////
     //
     if(get_val(PS4_L3) && event_release(PS4_R3))
     {
         ActivateWrestling = !ActivateWrestling;
        if(ActivateWrestling) combo_run(Rumble_Activated);
        else combo_run(Rumble_Deactivated);
     }
 
 
 
//===================//
///COMMANDS
//===================//
 
 
    //ROLL
    if(event_press(PS4_SQUARE) && dbl_time2<=0){
          dbl_time2 = 300;
 
    }else if(event_press(PS4_SQUARE) && dbl_time2){
          combo_run(Roll)
    }
    if(dbl_time2) dbl_time2 = dbl_time2 - get_rtime();
 
 
 
 
    //RAPID-FIRE
    if(ActivateRapidFire)
    {
        if(get_val(FIRE_BUTTON)) {
            combo_run(RapidFire);
        } else if(combo_running(RapidFire)) {
            combo_stop(RapidFire);
        }
    }
 
    //SPRINT
       if( abs(get_val(12))>60 || abs(get_val(11))>60){
 
 
            if(event_press(PS4_CROSS) && dbl_time<=0){
                 dbl_time = 300;
 
 
                 if(walk == 0) walk = 1;
                 else if(walk == 1) walk = 0;
                 else if(walk == 2) walk = 0;
 
            }else if(event_press(PS4_CROSS) && dbl_time){
                   walk = 2;
            }
             if(dbl_time) dbl_time = dbl_time - get_rtime();
 
 
            if(walk == 2)
            {
               combo_run(SPRINT);
            }
            else if(walk == 1)
            {
                 set_val(PS4_CROSS,100);
            }
 
      }
      else {
           sprint = FALSE;
           walk = FALSE;
      }
 
         //Stop SPRINT when either triggers are pressed.
        if(combo_running(SPRINT) && get_val(4) || get_val(7)) { 
            combo_stop(SPRINT);
        }
 
         //AIM
        if(ActivateAIM)
        {
            if(get_val(AIM_BUTTON))
            {
                if(!combo_running(Aim))
                combo_run(Aim);
            }  else if(combo_running(Aim))
 
                combo_stop(Aim);
 
        }
        //Anti-Recoil
        if(ActivateAntiRecoil)
        {
            if(get_val(FIRE_BUTTON))
            {
                combo_run(AntiRecoil);
            } else if(combo_running(AntiRecoil))
            {
                combo_stop(AntiRecoil);
            }
        }
 
        //Wrestling
        if(ActivateWrestling)
           combo_run(Wrestling);
        else if(combo_running(Wrestling))
           combo_stop(Wrestling);
 
 
           //Stop WRESTLING when either triggers are pressed.
        if(combo_running(Wrestling) && get_val(4) || get_val(7)) {
            combo_stop(Wrestling);
        }
 
}
//===================//
///COMBOS
//===================//
 
 
 
 
combo Rumble_Activated
{
      set_rumble(RUMBLE_A, 100);
      set_rumble(RUMBLE_B, 100);
      wait(200)
      reset_rumble()
}
combo Rumble_Deactivated
{
      set_rumble(RUMBLE_A, 100);
      set_rumble(RUMBLE_B, 100);
      wait(600)
      reset_rumble()
}
 
 
combo RapidFire {
    set_val(FIRE_BUTTON, 100);
    wait(hold_time);
    set_val(FIRE_BUTTON, 0);
    wait(rest_time);
    set_val(FIRE_BUTTON, 0);
    }
 
combo SPRINT {
    set_val(PS4_CROSS,100);
    wait(50);
    set_val(PS4_CROSS0);
    wait(50);
}
 
 
combo Roll {
    set_val(PS4_L2, 100);
    wait(50);
    set_val(PS4_SQUARE, 100);
    wait(50);
    set_val(PS4_SQUARE, 100)
    wait(50);
    set_val(PS4_L2, 0);
 
    }
 
 
combo Aim{
    set_val(AIM_BUTTON, 100);
    wait(300);
    set_val(AIM_BUTTON, 0);
    wait(01);
    set_val(AIM_BUTTON, 0);
}
 
 
combo AntiRecoil {
        anti_recoil = get_val(10) + ANTI_RECOIL;
        if(anti_recoil < -100) anti_recoil = -100;
        set_val(10, anti_recoil);
}
 
 
combo Wrestling {
    set_val(PS4_LX, 100);
    wait(40);
    set_val(PS4_LX, -100);
    wait(40);
}
 
 
 
 
//===================//
///FUNCTIONS
//===================//
 
 
 
//===================//
///LED
//===================//
 
 
function colorled(a,b,c,d) {
    set_led(LED_1,a);
    set_led(LED_2,b);
    set_led(LED_3,c);
    set_led(LED_4,d);
}



Converted for use with the Titan Two
Code: Select all
#include <titanone.gph>
 
 
/* ** GTA 5 Script
*
* TOGGLES:
* RAPID FIRE - SQUARE + DOWN
* SPRINT - SQUARE + LEFT
* AUTO AIM - SQUARE + RIGHT
* ANTI-RECOIL - SQUARE + UP
* ARM WRESTLING -  L3 + R3
* *********************************************************** */

 
 
define RATE_OF_FIRE   = 13; //  1 to 25 RPS (Round/s)
define ANTI_RECOIL    = -25;
define FIRE_BUTTON    = PS4_R2;
define SPRINT_BUTTON  = PS4_CROSS;
define AIM_BUTTON     = PS4_L2;
define time_to_dblclick  = 300;// time for second click to occur
int hold_time;
int rest_time;
int anti_recoil;
int sprint;
int walk;
int ActivateRapidFire   = TRUE;//FALSE
int ActivateSprint      = TRUE;//FALSE
int ActivateAIM         = TRUE;//FALSE
int ActivateAntiRecoil  = TRUE;//FALSE
int ActivateWrestling   = FALSE;//TRUE
int dbl_time2;
int dbl_time ;
int timer;
 
 
int rumble_type;
 
 
 
init {
    colorled(0,0,3,0);
    hold_time = 500 / RATE_OF_FIRE;
    rest_time = hold_time - 20;
    if(rest_time < 0) rest_time = 0;
}
 
 
main {
//set_val(TRACE_1,ActivateRapidFire);
//set_val(TRACE_2,ActivateSprint);
//set_val(TRACE_3,ActivateAIM);
//set_val(TRACE_4,ActivateAntiRecoil);
//set_val(TRACE_5,ActivateWrestling);
 
 
//===================//
///TOGGLES
//===================//
 
 
     if(get_val(PS4_SQUARE))
     {
          if(event_release(PS4_DOWN))
          {
              ActivateRapidFire = !ActivateRapidFire;
            if(ActivateRapidFire) combo_run(Rumble_Activated);
            else combo_run(Rumble_Deactivated);
          }
 
 
          if(event_release(PS4_RIGHT))
          {
              ActivateAIM = !ActivateAIM;
            if(ActivateAIM) combo_run(Rumble_Activated);
            else combo_run(Rumble_Deactivated);
          }
 
 
          if( event_release(PS4_UP))
          {
              ActivateAntiRecoil = !ActivateAntiRecoil;
            if(ActivateAntiRecoil) combo_run(Rumble_Activated);
            else combo_run(Rumble_Deactivated);
          }
     }
 
     ///////////////////////////////////////////////////////////
     //
     if(get_val(PS4_L3) && event_release(PS4_R3))
     {
         ActivateWrestling = !ActivateWrestling;
        if(ActivateWrestling) combo_run(Rumble_Activated);
        else combo_run(Rumble_Deactivated);
     }
 
 
 
//===================//
///COMMANDS
//===================//
 
 
    //ROLL
    if(event_press(PS4_SQUARE) && dbl_time2<=0){
          dbl_time2 = 300;
 
    }else if(event_press(PS4_SQUARE) && dbl_time2){
          combo_run(Roll);
    }
    if(dbl_time2) dbl_time2 = dbl_time2 - get_rtime();
 
 
 
 
    //RAPID-FIRE
    if(ActivateRapidFire)
    {
        if(get_val(FIRE_BUTTON)) {
            combo_run(RapidFire);
        } else if(combo_running(RapidFire)) {
            combo_stop(RapidFire);
        }
    }
 
    //SPRINT
       if( abs(get_val(12))>60 || abs(get_val(11))>60){
 
 
            if(event_press(PS4_CROSS) && dbl_time<=0){
                 dbl_time = 300;
 
 
                 if(walk == 0) walk = 1;
                 else if(walk == 1) walk = 0;
                 else if(walk == 2) walk = 0;
 
            }else if(event_press(PS4_CROSS) && dbl_time){
                   walk = 2;
            }
             if(dbl_time) dbl_time = dbl_time - get_rtime();
 
 
            if(walk == 2)
            {
               combo_run(SPRINT);
            }
            else if(walk == 1)
            {
                 set_val(PS4_CROSS,100);
            }
 
      }
      else {
           sprint = FALSE;
           walk = FALSE;
      }
 
         //Stop SPRINT when either triggers are pressed.
        if(combo_running(SPRINT) && get_val(4) || get_val(7)) { 
            combo_stop(SPRINT);
        }
 
         //AIM
        if(ActivateAIM)
        {
            if(get_val(AIM_BUTTON))
            {
                if(!combo_running(Aim))
                combo_run(Aim);
            }  else if(combo_running(Aim))
 
                combo_stop(Aim);
 
        }
        //Anti-Recoil
        if(ActivateAntiRecoil)
        {
            if(get_val(FIRE_BUTTON))
            {
                combo_run(AntiRecoil);
            } else if(combo_running(AntiRecoil))
            {
                combo_stop(AntiRecoil);
            }
        }
 
        //Wrestling
        if(ActivateWrestling)
           combo_run(Wrestling);
        else if(combo_running(Wrestling))
           combo_stop(Wrestling);
 
 
           //Stop WRESTLING when either triggers are pressed.
        if(combo_running(Wrestling) && get_val(4) || get_val(7)) {
            combo_stop(Wrestling);
        }
 
}
//===================//
///COMBOS
//===================//
 
 
 
 
combo Rumble_Activated
{
      set_rumble(RUMBLE_A, 100);
      set_rumble(RUMBLE_B, 100);
      wait(200);
      reset_rumble()
}
combo Rumble_Deactivated
{
      set_rumble(RUMBLE_A, 100);
      set_rumble(RUMBLE_B, 100);
      wait(600);
      reset_rumble()
}
 
 
combo RapidFire {
    set_val(FIRE_BUTTON, 100);
    wait(hold_time);
    set_val(FIRE_BUTTON, 0);
    wait(rest_time);
    set_val(FIRE_BUTTON, 0);
    }
 
combo SPRINT {
    set_val(PS4_CROSS,100);
    wait(50);
    set_val(PS4_CROSS,  0);
    wait(50);
}
 
 
combo Roll {
    set_val(PS4_L2, 100);
    wait(50);
    set_val(PS4_SQUARE, 100);
    wait(50);
    set_val(PS4_SQUARE, 100)
    wait(50);
    set_val(PS4_L2, 0);
 
    }
 
 
combo Aim{
    set_val(AIM_BUTTON, 100);
    wait(300);
    set_val(AIM_BUTTON, 0);
    wait(01);
    set_val(AIM_BUTTON, 0);
}
 
 
combo AntiRecoil {
        anti_recoil = get_val(10) + ANTI_RECOIL;
        if(anti_recoil < -100) anti_recoil = -100;
        set_val(10, anti_recoil);
}
 
 
combo Wrestling {
    set_val(PS4_LX, 100);
    wait(40);
    set_val(PS4_LX, -100);
    wait(40);
}
 
 
 
 
//===================//
///FUNCTIONS
//===================//
 
 
 
//===================//
///LED
//===================//
 
 
function colorled(a,b,c,d) {
    set_led(LED_1,a);
    set_led(LED_2,b);
    set_led(LED_3,c);
    set_led(LED_4,d);
}
User avatar
Sillyasskid
Captain
Captain
 
Posts: 574
Joined: Sat May 14, 2016 3:07 am


Return to User's Script Documentation

Who is online

Users browsing this forum: No registered users and 187 guests