[FORK][ESX] Engine Repair kit & Tyre Kit | esx_repairkit V3.2

Honestly, this script would be really great.
But the developer decided to remain silent and probably won’t fix anything
Its like total trash for now lol.

I get an error when adding the SQL to my database… Says unknown column in field limit… plus the items 2 items for this project don’t go to my items in my DB.

Unfortunately my PC died, since I’m not very good in LUA I need to test everything I modify … I will do my best to fix every issues when I can :confused:

You probably have a custom DB that don’t use the same as mine, try to adjust the .sql to your needs

Okay, that was fixed… Got it to work. Although the progress bar doesn’t pop up and I was at my front door when I did a repair.

InvokeNative: execution failed: Argument at index 1 was null.
SCRIPT ERROR: Execution of native 000000002f7a49e6 in script host failed.

I get this error when i used a tirekit. I googled a bit and i think it has something to do that this script is not compatible with onesync.

This script is just not updated for the new ESX version, the code is a bit messy.
Just wait for an update from the author.

If I’m allowed I can try to make an update for this script.

You can always make a pull request :slight_smile: Love to see a update.

same here

remove these from server.lua

TriggerClientEvent(_U(‘used_tyrekit’))
TriggerClientEvent(_U(‘used_kit’))

remove these from server.lua
TriggerClientEvent(_U(‘used_tyrekit’))
TriggerClientEvent(_U(‘used_kit’))

Change client.lua line 103

  		if Config.RealisticVehicleFailure then
  				SetVehicleEngineHealth(vehicle, 700.0)
  				SetVehiclePetrolTankHealth(vehicle, 700.0)
  			else
  				SetVehicleEngineHealth(vehicle, 1000.0) 
  				SetVehiclePetrolTankHealth(vehicle, 1000.0)
  			end

change to

            if Config.RealisticVehicleFailure then
                    SetVehicleUndriveable(vehicle,false)
                    SetVehicleFixed(vehicle)
                    healthBodyLast=1000.0
                    healthEngineLast=1000.0
                    healthPetrolTankLast=1000.0
                    SetVehicleEngineOn(vehicle, true, false )
                else
                    SetVehicleUndriveable(vehicle,false)
                    SetVehicleFixed(vehicle)
                    healthBodyLast=1000.0
                    healthEngineLast=1000.0
                    healthPetrolTankLast=1000.0
                    SetVehicleEngineOn(vehicle, true, false )
                end

and everything will now be fixed :slight_smile:

1 Like

The error is gone. But it still does not sync with the other player/players.

And -> It does not repair the visual aspect of the car, only the engine
It repairs the whole car :frowning:

“sync with the other player/players.”

What do you mean? if 1 person repairs their car it only shows up as repaired on their screen?

If i repair a tire it still flat for the other player.

Another edit:

Problem somewhat solved. Using another item. But still repairs the whole car :frowning:

just edit the code like i did for the repair kit, remove the full repair and make it so it only repairs a tyre

I did this. This will repair the vehicle just enough that you can drive it too the mechanic.

if Config.RealisticVehicleFailure then
						SetVehicleEngineHealth(vehicle, 450.0)
					else
						SetVehicleEngineHealth(vehicle, 450.0)
					end

Hi,

It doesn’t work for me he always says that he can’t find an engine no matter which car?

Doesnt work it says i need to be next to the engine to repair it, tyrekit works fine, not modded cars.

Ok
is there a kind replacement script for the motors repair as item ?

Please HelpScreenshot_2