[Release] Realistic Vehicle Failure

Its possible but how?

How to delete vehicle health?

how to display vehicle health, engine health, and body health ?

Guys i wonder how to set /repair at mechanic only for mechanic job so mechanic in job can do only final /repair.

Anyone else have to disable this script due to ““no script guid for vehicle 0 in SET_VEHICLE_HANDLING_FIELD”” errors when dealing with garages, shops, etc? Not just with addon cars but with all, including stock ingame cars.

Can we get an engine toggle built in? <3

If you are using esx_mecanojob the mecanic doesnt need this command.
You can repair with Jobmenu

Good job

is there a way to install this on vanilla GTA 5?

Does this script cause tires to pop randomly?

It does, if i remember correctly you can set it up in a config (timeframes when the tire can pop)

May have fixed it :P. Thank you for the quick response!

Hi,

is there a way to fix this, i type /repair and it repairs the car and fixes everything but in the chat it says
SYSTEM: repair is not a valid command!
how do i get rid of this error thats coming up? little confused as its repairing but then saying that in chat.

2 Likes

In my server i have a problem with trailers (limited few that are not add-on trailers, they are the in game semi trailers) hopping around furiously. I was just wondering if the script was causing that or it could possibly be another script

Engine still never turns off, ever, ran it into 40 walls drove it for 30 minutes

Just wondered if there was a way to add a timer to the repair shop as we’re trying to focus on serious RP. Something like if there is no mechanics online, then it takes 30 seconds or so to repair if you’re at a repair station.

Please DM if this is possible

Cheers

I know that but problem is people can repair vehicle after coming in “repair” zone for free by /repair i mean complete repair for free so i was wondering how to dissable this “final” repair in zones for people without mecanojob

its pretty easy. just find the spot where it the code actually repairs the car at a mechanic, create a TriggerServerEvent with a name like “mechanicCharge”

like this:
TriggerServerEvent('mechanicCharge')

put it right before the line in client.lua:
notification("~g~The mechanic repaired your car for $" … cost )
return
then
in server.lua create "Register Event Handler and AddEventHandler with the same name

something like this:

RegisterServerEvent('mechanicCharge')
AddEventHandler('mechanicCharge', function()
	local cost = 1000
	local _source = source
	local xPlayer = ESX.GetPlayerFromId(_source)
	local money = xPlayer.getMoney()
 	local bank = xPlayer.getBank()
 	if money >= cost then
         	xPlayer.removeMoney(cost)
	else
          	xPlayer.removeAccountMoney('bank', cost)
        end  	
end)

and then dont forget to add:

ESX = nil
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)

to the top of the server.lua

now the mechanic will charge a fee.

to add time to the interaction, in the client file right before the mechanicCharge call, add a player animation with a forced timer or something.

2 Likes

i think I would like to add a cost appraisal based on how much damage the car has sustained. Id also like the /repair command to require the person stand outside the car to do it, and make it animate like the mechno job or something, so you dont just spam /repair while driving 120 on the highway

Yes /2short