0 of 0

File information

Last updated

Original upload

Created by

HCL

Uploaded by

hcl20061218

Virus scan

Safe to use

14 comments

  1. sheatmypants
    sheatmypants
    • member
    • 0 kudos
    doesnt work even tho i installed it correctly
    1. fatherjimbo
      fatherjimbo
      • supporter
      • 2 kudos
      Yeah this mod is dead.
  2. GameRatt
    GameRatt
    • member
    • 0 kudos
    how do you use it
  3. michaelrdr2mods
    michaelrdr2mods
    • member
    • 0 kudos
    "I am not a native English speaker so sorry for my language." bro, your english was amazing
  4. TheLionGuy
    TheLionGuy
    • member
    • 0 kudos
    This is a great mod! i cant find a way to edit the controls tho. does anyone have a solution?
  5. sergiomiguel
    sergiomiguel
    • member
    • 0 kudos
    Love this mod. Thanks. Is it possible to create a similar one for Days Gone?
  6. anilcanglk
    anilcanglk
    • member
    • 0 kudos
    Hey! I'm a Game and Engine developer I like your mod and I improve things in your code.

    first, I've made your movement smooth we can easily and smoothly turn around now with this code:
    Atan2(moveDirection.X, moveDirection.Y) * 57.2958f
    Vector2.Lerp(moveDirection, currentDirection, 0.1f);

    that way I could remove lots of branches (if blocks, and checks)
    this code will perform well and feel smoother
    Vector2 moveDirection;
    private void OnTick(object sender, EventArgs e)
    {
    Ped playerPed = Game.Player.Character;
    if (FLYON)
    {
    if (player.Character.IsInVehicle())
    {
    Function.Call(Hash.SET_PED_GRAVITY, playerPed, true);
    Function.Call(Hash.SET_PED_CAN_RAGDOLL, playerPed, true);
    Function.Call(Hash.SET_PLAYER_CAN_USE_COVER, player, true);
    FLYON = false;
    if (FlyMount != null)
    {
    Function.Call(Hash.SET_PED_GRAVITY, FlyMount, true);
    FlyMount = null;
    }
    RDR2.UI.Screen.ShowSubtitle("Cannot fly in vehicle. Fly Mode Off");
    }
    else
    {
    if (Game.IsKeyPressed(IncreaseSpeedKey))
    {
    FlySpeed = System.Math.Min(FlySpeed + 0.5f, MaxSpeed);
    }
    if (Game.IsKeyPressed(DecreaseSpeedKey))
    {
    FlySpeed = System.Math.Min(FlySpeed - 0.5f, MaxSpeed);
    }
    Function.Call(Hash.DRAW_RECT, 0.05, 0.35, 0.00375, 0.15, 200, 240, 255, 255);
    Function.Call(Hash.DRAW_RECT, 0.05, 0.35, 0.0025, ((0.15 / MaxSpeed) * FlySpeed), 0, 40, 55, 255);
    if (FlyMount != null)
    {
    if (!Function.Call<bool>(Hash.IS_PED_ON_MOUNT, playerPed))
    {
    Function.Call(Hash.SET_PED_GRAVITY, FlyMount, true);
    Function.Call(Hash.SET_PED_CAN_RAGDOLL, FlyMount, true);
    FlyMount = null;
    RDR2.UI.Screen.ShowSubtitle("Fly without mount.");
    }
    else
    {
    if (Game.IsKeyPressed(Keys.W))
    {
    Function.Call(Hash.APPLY_FORCE_TO_ENTITY, FlyMount, 1, (0), (FlySpeed), (0), 0, 0, 0, 0, true, true, true, true, true);
    Function.Call(Hash.SET_ENTITY_ROTATION, FlyMount, 0, 0, (NC_Get_Cam_Rotation()).Z, 2, true);
    Function.Call(Hash.SET_ENTITY_VELOCITY, FlyMount, 0, 0, 0);
    }
    if (Game.IsKeyPressed(Keys.Space))
    {
    Function.Call(Hash.APPLY_FORCE_TO_ENTITY, FlyMount, 1, (0), (0), (FlySpeed), 0, 0, 0, 0, true, true, true, true, true);
    Function.Call(Hash.SET_ENTITY_VELOCITY, FlyMount, 0, 0, 0);
    }
    }
    }
    else
    {
    if (Function.Call<bool>(Hash.IS_PED_ON_MOUNT, playerPed))
    {
    FlyMount = Function.Call<Ped>(Hash.GET_MOUNT, playerPed);
    Function.Call(Hash.SET_PED_GRAVITY, FlyMount, false);
    Function.Call(Hash.SET_PED_CAN_RAGDOLL, FlyMount, false);
    RDR2.UI.Screen.ShowSubtitle("Fly with mount.");
    }
    else
    {
    ?????// THIS IS WHERE I EDITED MOST
    bool WPressed = Game.IsKeyPressed(Keys.W),
    SPressed = Game.IsKeyPressed(Keys.S),
    APressed = Game.IsKeyPressed(Keys.A),
    DPressed = Game.IsKeyPressed(Keys.D);
    if (WPressed | SPressed | APressed | DPressed)
    {
    Function.Call(Hash.APPLY_FORCE_TO_ENTITY, playerPed, 1, (0), (FlySpeed), (0), 0, 0, 0, 0, true, true, true, true, true);
    Function.Call(Hash.SET_ENTITY_VELOCITY, playerPed, 0, 0, 0);
    Vector2 currentDirection = new Vector2();
    if (WPressed) currentDirection.Y += 1.0f;
    if (SPressed) currentDirection.Y -= 1.0f;
    if (APressed) currentDirection.X += 1.0f;
    if (DPressed) currentDirection.X -= 1.0f;
    moveDirection = Vector2.Lerp(moveDirection, currentDirection, 0.1f);
    float angle = (float)System.Math.Atan2(moveDirection.X, moveDirection.Y) * 57.2958f;
    Function.Call(Hash.SET_ENTITY_ROTATION, playerPed, 0, 0, NC_Get_Cam_Rotation().Z + angle, 2, true);
    }
    else
    {
    moveDirection = Vector2.Lerp(moveDirection, new Vector2(0.0f, 0.0f), 0.1f);
    }
    if (Game.IsKeyPressed(Keys.Space))
    {
    Function.Call(Hash.APPLY_FORCE_TO_ENTITY, playerPed, 1, (0), (0), (FlySpeed), 0, 0, 0, 0, true, true, true, true, true);
    }
    Function.Call(Hash.SET_PED_GRAVITY, playerPed, false);
    if (Function.Call<bool>(Hash.IS_PED_RAGDOLL, playerPed))
    {
    Vector3 currentPosition = playerPed.Position;
    Function.Call(Hash.SET_ENTITY_COORDS, playerPed, currentPosition.X, currentPosition.Y, (currentPosition.Z - 1), true, false, false, false);
    }
    if (Function.Call<bool>(Hash.IS_PED_JUMPING, playerPed))
    {
    Vector3 currentPosition = playerPed.Position;
    Function.Call(Hash.SET_ENTITY_COORDS, playerPed, currentPosition.X, currentPosition.Y, (currentPosition.Z - 1), true, false, false, false);
    }
    }
    }
    }
    }
    }
    1. mtholubar
      mtholubar
      • premium
      • 11 kudos
      I'd like to try your code changes in my game. I can't use the mod as is. what lines of code does your code replace? (can I paste the code over his code at some location?)   thanks for your code.
  7. Daniillo96
    Daniillo96
    • member
    • 0 kudos
    Nice mod!
    Is there a fast running mod?
  8. TripleChanger
    TripleChanger
    • member
    • 21 kudos
    Rockstar just implemented an update, and so far it looks like it was aimed squarely at modding. None of the mods I was using work anymore and I double checked that they were installed correctly. I suspect none will work again until script hooks like the one needed for this one are updated.
  9. TripleChanger
    TripleChanger
    • member
    • 21 kudos
    Any chance of an update? Specifically, would loooooove to se a fix for the problem with being unable to fly down after failing a mission and choosing to restart it, continue from a checkpoint, or cancel the mission. I always have to reload the entire mission. Thanks! This is by far my favorite mod!
  10. SyntheticDiz
    SyntheticDiz
    • supporter
    • 0 kudos
    Love this mod. Thanks for making it.

    I have a question. Is it possible to remove the blue box/place it somewhere else? It's kinda hard to make screenshots and videos this way!