Author: | Eddlm |
Date: | 10.01.2016 |
Downloads: | 13744 | Statistics |
Filesize: | 3.826 KB |
Rating: | 10.00 based on 5 votes |
"Realistic", as in, no magic pushing your car, this script actually makes the car have more engine power.
Disclaimer
I'm aware of TurboSystemV's existence. Realistic Nitro is a different take at Nitro on GTAV, you won't get the same experience from the two scripts, they behave differently.
Description
This script adds a fairly basic Nitro system for you to use and abuse, with no limits for now.
While using the nitro, the car's engine will have more power, and the car will accelerate far more quickly, reaching top speed in no time and probably going over it.
The car's exhausts will burst fire, too.
Features
All player's vehicles have a nitro system now.
"Realistic" boosts, where the engine has more power, instead of magic pushing the car.
Fancy screen effect, if you want it.
A fancy sound effect too
No limitations on the nitro yet.
Installation
"Realistic Nitro.dll" and "RealisticNitro.ini" go inside \Grand Theft Auto V\scripts\ folder.
Settings
You can change multiple settings inside "RealisticNitro.ini" to tune the script's behavior to your likings, including the key to activate the nitro and the effects.
Controls
- Enter: reload settings from the .ini. (No notifications will be shown)
REQUIREMENTS
.NET Framework 4.5.2
Visual C++ 2015
ScriptHookV
ScriptHookVDotNet
Plans
Figure out how to make a limit for the nitro (nitro bar or something like that)
Figure out how to make the player gain nitro (driving against traffic...?)
Sourcecode
Here.
Are you the owner of this mod? If someone has stolen your work, you can make a request for removing this mod.
hey, here is a code snipe i had cut of my drag race mod ( i have no time to finish this mod :( )
i dont think its working in this condition because i ripped it out of my huge source code but the elements could be usefull for you.
you can fill up the nos_p value when you put a function to the on_tick event that adds one point every 20 ticks.
[code]
int nos_p = 180; /// nos holds for 180 ticks
bool nos_push_p = false; /// gets true if key j is pressed and false if its released
float nos_multi = 1.2f;
float engine_multi = 10f;
int nos_show_f = 3; /// number nos_X_base will divided to get the high for the nos-bar ( 60 )
// becaus: the higher nos_p -> the higher will be the shown bar! so you can controll the bar hight when you change the nos-time ( ticks )
// you can also calculate the percent, its the better choise. but i have no longer time for coding and this was only a small gimmick of the real mode
private void onKeyDown(object sender, KeyEventArgs e)
{
if (Game.Player.Character.IsInVehicle() == true && e.KeyCode == Keys.J)
{
nos_push_p = true;
}
}
private void onKeyUp(object sender, KeyEventArgs e)
{
if (Game.Player.Character.IsInVehicle() == true && e.KeyCode == Keys.J) //////////////////////////////////////// Nos
{
nos_push_p = false;
if (Function.Call<bool>(Hash._GET_SCREEN_EFFECT_IS_ACTIVE, "RaceTurbo") == true) {
Function.Call(Hash._STOP_SCREEN_EFFECT, "RaceTurbo");
}
}
}
public void onTick(object sender, EventArgs e)
{
if (Game.Player.Character.IsInVehicle() == true && nos_p > 0 && nos_push_p == true && Game.Player.Character.CurrentVehicle.Speed > 4f) ///////////////////////////////////////////////////////////////// NOS Spieler
{
Function.Call(Hash._SET_VEHICLE_ENGINE_TORQUE_MULTIPLIER, Game.Player.Character.CurrentVehicle, 1f + nos_multi);
Function.Call(Hash.SET_VEHICLE_BOOST_ACTIVE, Game.Player.Character.CurrentVehicle, true);
Function.Call(Hash._SET_VEHICLE_ENGINE_POWER_MULTIPLIER, Game.Player.Character.CurrentVehicle, engine_multi);
if (Function.Call<bool>(Hash._GET_SCREEN_EFFECT_IS_ACTIVE, "RaceTurbo") == false && nos_p > 0) { Function.Call(Hash._START_SCREEN_EFFECT, "RaceTurbo", 0, true); }
nos_p -= 1;
if (nos_p == 0)
{
Function.Call(Hash._SET_VEHICLE_ENGINE_TORQUE_MULTIPLIER, Game.Player.Character.CurrentVehicle, 1f);
Function.Call(Hash.SET_VEHICLE_BOOST_ACTIVE, Game.Player.Character.CurrentVehicle, false);
Function.Call(Hash._SET_VEHICLE_ENGINE_POWER_MULTIPLIER, Game.Player.Character.CurrentVehicle, 1f);
if (Function.Call<bool>(Hash._GET_SCREEN_EFFECT_IS_ACTIVE, "RaceTurbo") == true)
{
Function.Call(Hash._STOP_SCREEN_EFFECT, "RaceTurbo");
}
}
}
else
{
Function.Call(Hash._SET_VEHICLE_ENGINE_TORQUE_MULTIPLIER, Game.Player.Character.CurrentVehicle, 1f);
Function.Call(Hash._SET_VEHICLE_ENGINE_POWER_MULTIPLIER, Game.Player.Character.CurrentVehicle, 1f);
if (Function.Call<bool>(Hash._GET_SCREEN_EFFECT_IS_ACTIVE, "RaceTurbo") == true)
{
Function.Call(Hash._STOP_SCREEN_EFFECT, "RaceTurbo");
}
}
if (Game.Player.Character.CurrentVehicle != null)
{
new UIRectangle(new Point(10, 90 - nos_p / nos_show_f), new Size(5, nos_p / nos_show_f), Color.DarkRed).Draw(); /// NOS-balken
}
}
[/code]