[RELEASE] Speed limit after tyre bursts

GIF_TH_SMALLER copy

[Test]

speednotire

Fivem resource that limits car speed when tire bursts, good addition for role play server.
Speed limit can be easily changed at the top of client.lua file.
If more than one tire bursts speed decreases even more

Recommended:
esx_rapairkit (adds tyrerepairkit)

preview:

preview

Download:

Installation:

Add this to your server.cfg:

start speednotire

You can change speed limit after burst at the top of client.lua file

Update 0.8.5

  • There were lots of if statements inside while loop which made the script to use lots client’s resources, this is now changed and should work a bit lighter
  • Decreased Speed limit delay, added delay configuration at the top of client.lua for easier access
10 Likes

Nice work!

1 Like

Hello, very nice script. Could you add an option, other than tires, to limit the maximum speed of ALL cars on the server?

Example: that all cars do not exceed 350 km / h

holy cow what kind of cars are you using to have to worrie about that? there is not a straight away anywhere on the map that supports anything over 150, unless your 0-350 is in .00003 seconds hahaha just wondering.

You can change speed to whatever you want, this is in meters per second, so it would be a bit less than 100.0 if you want to limit to 350kmh.
Also you must write at least one 0 after decimal point, for example 100.0
Don’t write just 100

Citizen.CreateThread(function()
    while true do
        Citizen.Wait(0)
        local me = GetPlayerPed(-1)
        local veh = GetVehiclePedIsIn(me, false)
        if DoesEntityExist(veh) then
            SetVehicleMaxSpeed(veh, 20.0) -- set speed to what ever needed (this is im meters per second)
        end
    end
end)

There is also a way to limit each car through handling file

1 Like

Nice Script dude. here is my idea to improve this script : :arrow_down:
if car crashes (flip over and over ) when it has more than for example 100km speed it would be more realistic.
i think if you want to flip the car and show it like it is crashing its better to disable players control too. just saying.

1 Like

Thank you for the information, I admire your work and it speaks highly of you having shared it with the community!

1 Like

I think what the user suggested is the following: Can you add a speed limit for the whole server? even without the tires being flat

1 Like

Sure there is. Now trying to accurately portray a Konigsegg Agera RS top speed over slightly over 300MPH, and achieve it, that’s a bit more difficult to do with traffic enabled. But the Eastern Highway going north and south, it’s pretty achievable with no traffic.

I actually have created a similar script, but it is not perfect yet, i will release it soon. it disables the controls for a bit after crash, then adds a screen effect. The strength and duration of effect depends on how fast you were going before the crash and how much damage the car absorbed. I still need to fix it: the effect now appears with a small delay after the accident and i want to add blackout and controls disabling duration depending on speed
demo

2 Likes

I like this. Congrat

1 Like

Thats a nice hud could you send me a link?

i meant his edited version

Oh, I edited it myself, it’s just some css that done here

do you mind sending it to me?

main.css (11.2 KB)

1 Like

Can you give me your source code for trew_hud_ui ?

Thanks!!

Lol, even with traffic