Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script "FDSprintSystem" ENTER {
- if (GameType () == Game_Title_Map) Terminate;
- int Sprinting, tics, OldSpeed = 0;
- While (TRUE) {
- if (CheckInventory ("SprintWeapon") && Sprinting == 0) {
- SetActorProperty (0, APROP_Speed, OldSpeed);
- DisableWeapon ("SprintWeapon");
- Sprinting = 0;
- tics = 0;
- }
- if (keyDown (BT_USER1) && Sprinting == 0 && CheckInventory ("FDStamina") >= 5) {
- DisableWeapon ("SprintWeapon");
- Sprinting = 1;
- OldSpeed = GetActorProperty (0, APROP_Speed);
- }
- if (keyUp (BT_USER1) && Sprinting == 1) {
- SetActorProperty (0, APROP_Speed, OldSpeed);
- DisableWeapon ("SprintWeapon");
- Sprinting = 0;
- tics = 0;
- }
- if (Sprinting == 1 && CheckInventory ("Sprinting")) {
- if (CheckInventory ("FDStamina") >= 5)
- {
- if (tics == 5 && CheckInventory ("Sprinting")) {
- tics = 0;
- if (!CheckInventory("PowerAgilityRune") && GetVelocity () > 0)
- TakeInventory ("FDStamina", 5);
- }
- if (CheckInventory ("FDStamina") < 5) {
- SetActorProperty (0, APROP_Speed, OldSpeed);
- DisableWeapon ("SprintWeapon");
- TakeInventory ("Sprinting", 1);
- Sprinting = 0;
- tics = 0;
- }
- if (CheckInventory ("Sprinting") && ((abs (GetPlayerInput (-1, INPUT_FORWARDMOVE)) > 6400) || (abs (GetPlayerInput(-1, INPUT_SIDEMOVE)) > 6400)))
- SetActorProperty (0, APROP_Speed, 1.6);
- else
- SetActorProperty (0, APROP_Speed, 2.6);
- }
- }
- Delay (1);
- if (Sprinting == 1)
- tics++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement