Found this code
public static void SetNitroEnabled(this Vehicle vehicle, bool toggle, float level = 2.5f, float power = 1.1f, float rechargeTime = 4f, bool disableSound = false)
{
if (!Function.Call<bool>(GTA.Native.Hash.HAS_NAMED_PTFX_ASSET_LOADED, "veh_xs_vehicle_mods"))
Function.Call(GTA.Native.Hash.REQUEST_NAMED_PTFX_ASSET, "veh_xs_vehicle_mods");
if (toggle == true)
{
//if (!Function.Call<bool>(GTA.Native.Hash._0x36AD3E690DA5ACEB, "CrossLine")) //ANIMPOSTFX_IS_RUNNING
// Function.Call(GTA.Native.Hash._0x2206BF9A37B7F724, "CrossLine", 0, true); //ANIMPOSTFX_PLAY
Function.Call(Hash(0xC8E9B6B71B8E660D), vehicle, toggle, level, power, rechargeTime, disableSound); //_SET_VEHICLE_NITRO_ENABLED
}
if (toggle == false)
{
//if (Function.Call<bool>(GTA.Native.Hash._0x36AD3E690DA5ACEB, "CrossLine")) //ANIMPOSTFX_IS_RUNNING
// Function.Call(GTA.Native.Hash._0x068E835A1D0DC0E3, "CrossLine"); //ANIMPOSTFX_STOP
Function.Call(Hash(0xC8E9B6B71B8E660D), vehicle, toggle, level, power, rechargeTime, disableSound); //_SET_VEHICLE_NITRO_ENABLED
}
}
static public unsafe void SetNitroOn(Vehicle v)
{
var vehHandle = v.MemoryAddress;
IntPtr address = (IntPtr)FindPattern("\x38\x8B\x00\x00\x00\x00\x74\x04\xB1\x01\xEB\x58", "xx????xxxxxx");
//\x38\x8B\x00\x00\x00\x00\x74\x04\xB1\x01\xEB\x58
//\x8A\x83\x00\x00\x00\x00\x84\xC0\x75\x09\x40\x84\xFF
if (address != null)
{
var g_vehNitroEnabledOffset = *(int*)(address + 2);
bool d = *((bool*)(vehHandle + g_vehNitroEnabledOffset));
Function.Call(Hash.REQUEST_NAMED_PTFX_ASSET, "veh_xs_vehicle_mods");
Function.Call((Hash)0xC8E9B6B71B8E660D, v, 1);//Enable nitro
Function.Call((Hash)0x30B5831ECD9C35C5, v, 1f); //Set mult
Function.Call((Hash)0x6E31900C2247D4ED, v, 1); //??
Function.Call((Hash)0x6DEE944E1EE90CFB, v, 1); //??
Function.Call((Hash)0x6411EB7E837170B5, v, 1f); //??
Function.Call((Hash)0x2970EAA18FD5E42F, v, 1); //??
// *((bool*)(vehHandle + g_vehNitroEnabledOffset)) = true;
}
}```
RequestNamedPtfxAsset(“veh_xs_vehicle_mods”) - Only make flames on car
SetVehicleNitroEnabled(veh, 10000.0, 5.5, 5.1, 0.1, false) without while, nitrous sounds like always empty. inside while, only seems to work 1 time…
my research its based on things i found on internet, and script testing, because i don’t have knowledge to search/view decompiled gta scripts