[FREE] Antilag/Twostep script

@Yorick Amazing Job on the recent update! This will make my racing server more enjoyable now :facepunch:

1 Like

Is there a way to make the Anti-lag only function when turbo is installed? Having a random stock car with Anti-lag right off the bat is weird.

This will be a super easy check, I just need to check if that vehicle has the turbo modification applied. I currently don’t have time for it tho. I will add this to the script once I have time. Good one!

2 Likes

This should work

if RPM > Config.RPM then
    if IsToggleModOn(veh, 18) then
        TriggerServerEvent("flames", VehToNet(veh))
        TriggerServerEvent("sound_server:PlayWithinDistance", 25.0,
            tostring(math.random(1, 6)),
            0.9)
        SetVehicleTurboPressure(veh, 25)
        Wait(delay)
    else
        QBCore.Functions.Notify('You do not have a turbo installed', 'error', 7500)
    end
end
3 Likes

Where should i put this? and I’m using ESX, so that QBCore line will not work.

Ah just change it to an esx notification.

That should go in client.lua near line 32 or something

1 Like

How can i change the colors to the flames?

The flames are generated using existing particles, it’s not possible as far as my knowledge goes, to change this.

Oh ok Flamethrower Tune is able to change colors too. So possible is. Just asking if u were able to do it. Thanks

Sounds amazing! The people in my server love it too! 5 stars 100%

1 Like

any luck with custom sounds? love this but not keen on the explosion sounds :slight_smile:

The custom sounds are already added.

1 Like

facepalm. didnt notice the update :smiley:

1 Like

you can use this file Purple | Blue Vehicle Flames / Backfire [Replace | SP | FiveM] - GTA5-Mods.com
amazing job by the way im using it on my server an everyone love it

Could possibly use SetParticleFxLoopedColour - FiveM Natives @ Cfx.re Docs

1 Like

Nice script, just one issue, anyway to change the sound so it actually sounds like its in game and not just banging in headset

1 Like

when i use no sound, any idea?

it’s posible. Just rip the sounds from a vanilla car with your prefered sound. Some vanilla cars have different backfire sounds. Once you get the audio file. Just rename them to the ones listed in the script.

Did you add the car model to the config?

yea i did the car only have flames but without the custom sound

2 Likes