How do I heal a vehicle the player is in?

I’ve tried a few different things to no avail even tried reworking a script I had that does work for ped health refill within a circle(s).

But i’m trying to make a script where when inside a circle(s) placed wherever you can heal your vehicle when you press a button like the horn then a timer begins for lets say 20 seconds when a key is pressed, then it ends with a simple message but so far I have not had any luck. I’ve tried entityhealth related and SetVehicleFixed but nothing seems to work for me.

SetVehicleEngineHealth (vehicle, 1000.0)
SetVehicleFixed(vehicle)

should do the trick

I’ll give it a try thank you

no worries, make sure u have the vehicle specified like

local vehicle = GetVehiclePedIsIn(GetPlayerPed(-1), false)
SetVehicleEngineHealth (vehicle, 1000.0)
SetVehicleFixed(vehicle)