[Release] Realistic Vehicle Failure

So what exactly does the whole “compress and expand” thing mean regarding handling files for config options such as “deformationExponent” and “engineDamageExponent”?

Sorry if stupid question.

I used your example and it almost works perfect (technically it does work exactly as it should for what the change you gave does but…) The problem is that someone can pull up, type the command, they are given the message about waiting, but they can just drive off and once the timer runs out, the repair completes while they are driving down the road. Is there a way for the repair to shut the engine off and then turn it back on once the repair is done?

@TTVResqDiver1317 Maybe add SetVehicleUndrivable(vehicle,false) above the Wait(10000) so it kills the vehicle, waits 10 seconds, then fixes the vehicle :slight_smile:

Sorry, I forgot to update after we sorted this. I did try the SetVehicleUndrivable(vehicle,true) to disable the vehicle but found that only seems to only stop the driver from getting back in if they are out of the vehicle. I did not try setting vehicle,false as the repair script does that already after the wait so I assumed based on that fact and from what I read about that native that false would make it driveable and true would make it undriveable.
Either way, we did come up with a couple other solutions.
My plan B if we didn’t find a proper fix is instead of the 20 second timer we have, I would do a 4 second timer, run the SetVehicleEngineOn(vehicle, false, true, true) again, then another time, then the engine, etc… until we made it 20 seconds. Basically just keep cutting the engine if they kept trying to restart it in vMenu.
The solution we ended up using was:
shut off engine with SetVehicleEngineOn as above, then used SetVehicleMaxSpeed(vehicle, 0.01) then after the timer completes we used SetVehicleMaxSpeed(vehicle, 0). The end result is yes, they can restart the engine but if they try to drive away, they are just sitting there doing a burnout and just barely moving. They make it a whole 2-3 feet max during the 20 second timer.

This effectively prevents someone from FailRPing by coasting past the mechanic and typing the command as they roll by and then driving away and having the repair complete while they are a few blocks down the road still trying to evade LEO.

1 Like

how can you disable the option that makes you car reverse or go forward if you press s or w again??

Hi dude, I know it was a while ago, but do you remember how you fixed it?

how can I fix: “no script guid for vehicle 0 in SET_VEHICLE_HANDLING_FIELD” ?

Using this seems to disable the ability to use the Torque feature on the last release of vmenu. Anyone figure out a way around that? I know it works on some other trainers, but I really like vmenu, especially because it’s server side and easy to enable / disable commands for clients.
Thanks

*update
I was checking out the .lua files and it looks like Limpmode, preventvehicleflip, and torquemuliplier all mess with torque. However it looks like the torqueMuliplierEnabed is the control that breaks vmenu. Sadly that is of course one that i really LOVE! but it looks like they just might be incompatible. If anyone has any ideas I’d appreciate it!

What exactly do you mean by “breaks vMenu”. Does this mean that vMenu won’t work with this script if players are allowed to use torque multipliers? Or is it just if they put torque multipliers on?

Clarification: It doesn’t break anything, it’s just that simply the torque options no longer function. Switching torque multiplier to “on” has no effect.

okay thank you for the clarification.

How do i make it since damage to other players as when i get out of the car damaged and it wont move someone else gets in it and it autorepairs

hey im having an issue with ur script hopefully u can help me out, so when i load this script is making some kind of problem with esx_baginventory any idea why?

Hi. So, has anyone had issues with players losing health when just driving at speeds of over 100mph with this script? Any idea how to fix this? Thanks in advance…