2024 this mod does not seem to work at all. either incompatable with my other working mods or is just not updated with the new scripthook. please update or send a fix. i have a bunch of mods on lml and this one is the only script mod i have but it wont work
Just installed it last nigh. Got the the both scripthooks and it doesnt work. Every mod works for me but this one. What going on? am I missing something?
Yes, that is not difficult. You can simply duplicate a ".cs" file, delete all contents in it and add the following lines: using System; using System.Windows.Forms; using RDR2; using RDR2.UI; using RDR2.Native; using RDR2.Math;
namespace HCL_Superpower_00 { public class Main : Script { Player player = Game.Player; public Main() { Tick += OnTick; Interval = 1; }
Since after the last game update the scripthook is not functional and all mods depending on it stop working, we have to wait untill the scripthook is updated. But I have replace the first six lines with using System; using System.Windows.Forms; using GTA; using GTA.Native; using GTA.Math; and tested the script with GTA5, it works fine. The "0.2f" can be set to any value you like.
Oh, of course these lines will make you always slow time when you aim a gun. If you want a switchable function like this mod, I can make it but it will work only after the scripthook gets updated.
Actually to make the current mod to only slow time when aiming a gun, you just need to open the file with a notepad and find this line: Function.Call(Hash.SET_TIME_SCALE, STMutiply); replace it into if (Function.Call<bool>(Hash.IS_PLAYER_FREE_AIMING, player)) { Function.Call(Hash.SET_TIME_SCALE, STMutiply); } else { Function.Call(Hash.SET_TIME_SCALE, 1.0f); }
I think that will work. But again, we need the scripthook updat to see that.
I really like the simplicity of this, how would you make it so it only activates when you press a key, instead of it checking for when the player is aiming: if (Function.Call<bool>(Hash.IS_PLAYER_FREE_AIMING, player))
I tried to make it so the if function checks for a key press but I'm not that experienced so any ideas on how to make it work??
59 comments
or send a fix. i have a bunch of mods on lml and this one is the only script mod i have but it wont work
using System;
using System.Windows.Forms;
using RDR2;
using RDR2.UI;
using RDR2.Native;
using RDR2.Math;
namespace HCL_Superpower_00
{
public class Main : Script
{
Player player = Game.Player;
public Main()
{
Tick += OnTick;
Interval = 1;
}
private void OnTick(object sender, EventArgs e)
{
if (Function.Call<bool>(Hash.IS_PLAYER_FREE_AIMING, player))
{
Function.Call(Hash.SET_TIME_SCALE, 0.2f);
}
else
{
Function.Call(Hash.SET_TIME_SCALE, 1.0f);
}
}
}
}
Since after the last game update the scripthook is not functional and all mods depending on it stop working, we have to wait untill the scripthook is updated. But I have replace the first six lines with
using System;
using System.Windows.Forms;
using GTA;
using GTA.Native;
using GTA.Math;
and tested the script with GTA5, it works fine. The "0.2f" can be set to any value you like.
Function.Call(Hash.SET_TIME_SCALE, STMutiply);
replace it into
if (Function.Call<bool>(Hash.IS_PLAYER_FREE_AIMING, player))
{
Function.Call(Hash.SET_TIME_SCALE, STMutiply);
}
else
{
Function.Call(Hash.SET_TIME_SCALE, 1.0f);
}
I think that will work. But again, we need the scripthook updat to see that.
I tried to make it so the if function checks for a key press but I'm not that experienced so any ideas on how to make it work??