[Release] Realistic Vehicle Failure

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??

1 Like

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?

1 Like

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…

Is anyone else getting a problem with this not working at all or just me?

This script works like charm, everything besides one thing, for some reason the bikes tend to break almost instantly, the config damage multiplier is already set to 0.0, how can I fix this?

1 Like

Hello, so I downloaded the newest version and it didn’t work. I reverted to the version just under this.

Hey everyone, how to make the car break harder?

in handling file.

Hi, This script is amazing, was wondering if theres a way to make it so it takes 5-10 seconds to repair the vehicle so no one can just go up to one in a pursuit and repair there car?

Same. This would be really awesome to have

is there a way to add a price to the /repair function

can you tell me what that call might have been I have the same issue and all I did was comment some stuff out of client lua.