If you are at a mechanic and you want it to take 10 seconds for the mechanic to fix the vehicle and display a notification that it will take 10 seconds. Add this code below to your client.lua file on around line 174.
Add this:
notification("~g~Please wait 10 seconds while the mechanic is repairing your car!")
Wait(10000)
Should look something like this:
if IsNearMechanic() then
notification("~g~Please wait 10 seconds while the mechanic is repairing your car!")
Wait(10000)
SetVehicleUndriveable(vehicle,false)
SetVehicleFixed(vehicle)
healthBodyLast=1000.0
healthEngineLast=1000.0
healthPetrolTankLast=1000.0
SetVehicleEngineOn(vehicle, true, false )
notification("~g~The mechanic repaired your car!")
return
end
Change the Wait(10000) to whatever number you want the person to wait (Number must be in Millisecond). Also, you can customize the Notification message to your liking.
is there a way to add tire damage multiplier that affects handling ?
so if you pop a steer tire id reduces turning 50% and pulls to whichever side ?
both steer tires and you loose 99% of turning, and same with drive tires, lose 1 and you lose 50% of lateral sliding traction, lose both and you just spin and dont go anywhere and the tail end just slides around. ?
ive been looking into how to add that but have come up emtpy, if someone knows a way please let me know
hello all , need help with car high damage , i didn’t add any script , but when the car hit any thing even with 10km speed , it broke
i have searched in my script and found this :
function Global.SetVehicleAudioEngineDamageFactor(vehicle, damageFactor)
return _in(0x59E7B488451F4D3A, vehicle, damageFactor)
end
Global.N_0x59e7b488451f4d3a = Global.SetVehicleAudioEngineDamageFactor
what do i do to make the visual damage work for the custom add-on cars?
And also i want the actual mechanic be the only one to repair the cars, how do i disable the repair shops?
Hey can someone explain how to set the speed lower when the car is damaged?. Our cars drive now up to 100 km/h, when its fully damaged. And we want them to drive maximum 1-2 km/h
All of my LEO vehicles are flipping like crazy, it only happens with this script. Is there a way for me to fix this without having to edit all of my vehicles handling lines?
So what exactly does the whole “compress and expand” thing mean regarding handling files for config options such as “deformationExponent” and “engineDamageExponent”?
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