Unexpected behaviour of SetVehicleAutoRepairDisabled with SetVehicleExtra

When you use

SetVehicleAutoRepairDisabled(vehicle, true)

on a vehicle, put a script to toogle extras inside a while, and when another player become close to the vehicle, the vehicle AutoRepairDisabled state will be disconsiderated, resulting in the vehicle being repaired.
This bug can cause some problems like massive lag on some cases, when the vehicle is fixed and broken at the same time with SetVehicleExtra call, causing a lot of doors drop and a lot of lag too. Can cause too doors opening and closing very quickly too, basicly it cause a crazy desync between clients.

Resume: The vehicle, when another player is close, will stay auto repairing when you toogle a Extra with SetVehicleAutoRepair as true.

I already tried to use SetVehicleAutoRepair on both clients inside a while, but the vehicle still auto repairing.

That bug happen on Non-OneSync and OneSync too.

Some examples of this happening:

(Auto repair)

(Doors glitch)

1 Like

I reported the exact same issue some time ago SetVehicleExtra() causing weird behaviours but it got closed because of bump so I’ll bump here now and hopefully wont get just closed because it’s too much work to fix?

To reproduce this issue you need two players, one sitting in a car spamming SetVehicleExtra() and have the other player shoot at the car.

weird behaviours from weird methods… R* doesnt turn on/off an extra to make their sirens so u wouldnt do this as well.

On YT u can find some tutorials to convert an ELS vehicle to “non-els”/native siren

What do you mean? I’m no longer on that dev team (fuck em) but we used the SetVehicleExtra() native to change the texture on this light bar that has different colors. That’s the “ELS” we did. And oh we used DrawLightWithRangeAndShadow() to… draw lights.
image

bumping 2 year old topic