Vehicle Stuttering Effect

Hello!

I’m currently working on my own custom fuel script since FRFuel doesn’t offer everything that I want to be able to achieve with a fuel script. At the moment, I’ve got it working to a point where the vehicle will shut off when the fuel level gets too low, but I want to be able to give the operator a warning that their vehicle is running on fumes before just cutting out.

I tried looking through the FRFuel source code but couldn’t find where it handles the fuel getting too low. I did, however, find where the fuel bar starts the ‘low fuel’ animation but that’s all I managed to find and nothing about the vehicle stuttering.

To do it on my own, I’ve attempted to just turn the engine off for 250-500 milliseconds to have a temporary stutter but the effect the FRFuel has is really what I’m looking for.

Does anyone know how to achieve this similar effect, and if so, how would I tackle it?
Any help would be appreciated! :smile:

Okay, so after a good 2-3 hours looking through other source codes of other scripts and even single-player fuel mods… I finally figured it out… It may or may not have been sitting right in front me.

I had to use the SetVehicleFuelLevel native, if anyone else was wondering :smile: