[Release] Realistic Vehicle Failure



Regarding randomly breaking vehicles…

I don’t believe it’s random. There must be some incompatibility with another script.
I want to fix it, but I simply can’t reproduce the problem here, which makes it really really hard to fix.

It’s a little discouraging that people will complain about it, but not do a simple test to help me out.

Ok, rant over.

Since I can only guess about the cause of the problem, I have done just that.

The current develop branch on GitHub contains a new compatibility mode.
It solves the breaking issues with BVA script (Better Vehicle Actions), and it might also solve some other conflicts.

The compatibility mode is enabled in the test version linked above, but will be disabled by default when released.

The downside is that explosion prevention does not work in this mode.

With BVA, if you turn off the engine, a single shot to the fuel tank will cause an explosion.

If you have problems with randomly breaking vehicles, please download the develop version linked above and report back. Thank you.


disregard last reply. i didnt see the post above this


Absolutely loving this script, thank you very much for this release and updates. It just takes a bit to zero it all in for each person due to multiple scripts.


This is a great script, I just have one request:

Can we have an option added that destroys the vehicle once it reaches a certain (configurable) speed?

Such as a vehicle overheating at 180mph or something similar to that?


I would say that isn’t very realistic. In real life you can normally drive at full speed for hours with no problems. Have done it myself on the German Autobahn. Besides that, no land vehicle in GTA can reach 180 mph.

However, GTA does actually simulate engine temperature.
Normally the temperature drops when driving fast due to air cooling of the engine.
It does rise if you do a burnout or donuts or hold the handbrake plus accelerator.

I’ll think about it and see if there’s a way to incorporate that into the script. No promises.

Thanks for the suggestion.


I was thinking more along the lines of a governor’s pin that I believe is standard in American vehicles. I was just thinking that there would only be two ways of implementing it, one of which being destroy the engine (aka “overheating”) or the other being shut down completely.


Sorry to sound dense. I have no idea what that means. I have never heard of a device that shuts the engine off or destroys it when reaching a certain speed. When I google it, I find something about speed limiters, nothing like what you say.
As I understand it, most cars that are speed limited do it for insurance purposes, and to avoid tires bursting.
Besides that, speed in GTA is already limited to below real life speeds for most vehicles.

Please point me to literature that explains what that device does, and I will gladly research it.

If someone in here has deep knowledge of cars and engines, please chime in.


That is the link to their use as speed limiting devices. My friend was driving his Camaro one time down a drag strip and once he hit a certain speed, the vehicle’s engine shut itself off (he was still able to use breaks), and one of the box trucks owned by the company I work for is limited to 60mph, when the engine hits that, it just revs. I was assuming that the vehicle shutting off would probably add the most similar effect, because I’m unsure if you could make the engine rev once a car hits a certain speed. This would make a very useful device for pursuits (due to a custom handling.meta I have installed), and I’m not 100% sure police vehicles have them.

But if you could find a way to realistically add it, I would very much appreciate it.

Edit: Brakes* - I didn’t proofread as I was typing.


I don’t believe this is standard equipment on road legal cars. The Wikipedia article doesn’t mention anything about shutting off the engine, just that is regulates the speed.

Not sure I understand, do you mean revs as if the transmission is in neutral?


I’m not too sure what exactly happened with his car, but in reference to the box truck, yes - it just revs the engine as if the vehicle were in neutral, not allowing it to pick up speed unless it’s moving downhill.


is there anyway to make this mod work with els?
when I don’t use els the mod works fine and the vehicle drive like normal. however as soon as I turn on the lights of the cruisers it kills the car. I have taken out the fuel mods and any other vehicle action scripts we had on the server.


When I search for els I get a ton of results… Could you point me to where I can download it, then I’ll look into it.


sure give me a second to find the link


here is the link [Release] ELS FiveM | Server Sync | Lights | Sirens | Custom Patterns


…And of course the download link is down at the moment. I’ll try again later and get back to you when I have looked into it.


ok no problem take your time thanks for the timely response.


I can’t get that ELS script to work. Admittedly I know very little about installing stuff on FiveM, and I don’t have time do do a lot of research to find out what additional stuff I need to install to get it to work.

But I had a look at the source code, and found something peculiar.
Line 391 of els-fivem/client/client.lua has this line:

SetVehicleBodyHealth(veh, vehicleHealthBefore)

The vehicleHealthBefore variable isn’t defined anywhere, which means that it sets the vehicleBodyHealth to zero.

It makes absolutely no sense to have that line in there. Without my script, the vehicle will still work, but with my script, it will also kill the engine, due to the multiplication of damage across engine/body/fueltank.

Try commenting out that line by adding – (two minus signs) before the line, like this:

-- SetVehicleBodyHealth(veh, vehicleHealthBefore)

…and restart the els-fivem script. I bet that will solve the problem. Please report back whether it has an effect or not.


ok I tried what you said and it kinda worked but then again didn’t. the car no longer is damaged when I turn the lights on however. the vehicle no longer takes damage. I tried to damage the vehicle without the lights on and it gets damaged like normal but as soon as I turn the lights on the damage is repaired and the vehicle becomes indestructible.


Really appreciate your help. Let’s continue via PM.

When I have a solution, I’ll announce it here.


New Version Released

Version 1.1.1 adds random tire burst and a new compatibility mode that solves some problems with other scripts.

Compatibility mode is disabled by default, but you can easily enable it in the config file.
Whenever another script sets the health of the vehicle to zero, my script will now ignore the change.
This is known to solve incompatibility with ELS and BVA. Maybe it solves other problems too.

The downside of enabling compatibility mode is that explosions can no longer be prevented.
If you turn off the engine using BVA, a single bullet to the fuel tank can explode the car.

Please note that ELS has a god mode problem (That seems to be rooted in a FiveM bug), where the car repairs itself whenever you have ELS lights on.
There is no workaround for that, since my script can’t see if a repair comes from a trainer, fix script or the ELS bug.

Compatibility Mode for ELS works best if you comment out line 391 in els-fivem/client/client.lua. (els-fivem v1.0.5 only! Don’t do it for other version!) - That line looks like a leftover from an attempt to solve the god mode problem.

Random Tire Burst
When you are driving at above 22mph there is now a risk that a tire will puncture or burst.
In the config file you can disable the feature or you can set the desired interval between tire failures.

Default value of 120 minutes means that on average a tire will burst every two hours.
This is done using statistical probability, so it’s not an exact science. You may puncture twice within half an hour, or you may not have a single puncture for 8 hours.

A huge thanks to Xatamaur for helping me reproduce the ELS problem on my own server.

Get the new version using the link in the first post.